Skip to content

Commit

Permalink
Remove obsolete static lifetime
Browse files Browse the repository at this point in the history
Because constants are static by default
  • Loading branch information
exul committed Nov 1, 2017
1 parent cf18c08 commit df36923
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/matrix-rocketchat/api/rocketchat/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ use i18n::*;
use super::{Channel, Endpoint, User};

/// Login endpoint path
pub const LOGIN_PATH: &'static str = "/api/v1/login";
pub const LOGIN_PATH: &str = "/api/v1/login";
/// Me endpoint path
pub const ME_PATH: &'static str = "/api/v1/me";
pub const ME_PATH: &str = "/api/v1/me";
/// Users list endpoint path
pub const USERS_INFO_PATH: &'static str = "/api/v1/users.info";
pub const USERS_INFO_PATH: &str = "/api/v1/users.info";
/// Channels list endpoint path
pub const CHANNELS_LIST_PATH: &'static str = "/api/v1/channels.list";
pub const CHANNELS_LIST_PATH: &str = "/api/v1/channels.list";
/// Direct messages list endpoint path
pub const DIRECT_MESSAGES_LIST_PATH: &'static str = "/api/v1/dm.list";
pub const DIRECT_MESSAGES_LIST_PATH: &str = "/api/v1/dm.list";
/// Post chat message endpoint path
pub const POST_CHAT_MESSAGE_PATH: &'static str = "/api/v1/chat.postMessage";
pub const POST_CHAT_MESSAGE_PATH: &str = "/api/v1/chat.postMessage";

/// V1 get endpoints that require authentication
pub struct GetWithAuthEndpoint<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/matrix-rocketchat/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ macro_rules! i18n_languages {
i18n_languages!(en);

/// Language that is used if no language is specified
pub const DEFAULT_LANGUAGE: &'static str = "en";
pub const DEFAULT_LANGUAGE: &str = "en";
// LCOV_EXCL_STOP
12 changes: 6 additions & 6 deletions tests/matrix-rocketchat-test/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ use slog::{Drain, FnValue, Level, LevelFilter, Record};
use tempdir::TempDir;

/// Name of the temporary directory that is used for each test
pub const TEMP_DIR_NAME: &'static str = "matrix_rocketchat_test";
pub const TEMP_DIR_NAME: &str = "matrix_rocketchat_test";
/// Name of the database file
pub const DATABASE_NAME: &'static str = "test.db";
pub const DATABASE_NAME: &str = "test.db";
/// Application service token used in the tests
const AS_TOKEN: &'static str = "at";
const AS_TOKEN: &str = "at";
/// Homeserver token used in the tests
pub const HS_TOKEN: &'static str = "ht";
pub const HS_TOKEN: &str = "ht";
/// Rocket.Chat token used in the tests
pub const RS_TOKEN: &'static str = "rt";
pub const RS_TOKEN: &str = "rt";
/// Number of threads that iron uses when running tests
pub const IRON_THREADS: usize = 4;
/// The version the mock Rocket.Chat server announces
pub const DEFAULT_ROCKETCHAT_VERSION: &'static str = "0.49.0";
pub const DEFAULT_ROCKETCHAT_VERSION: &str = "0.49.0";

lazy_static! {
/// Default logger
Expand Down

0 comments on commit df36923

Please sign in to comment.