Skip to content

Commit

Permalink
fix: & without an explicit lifetime name cannot be used here.
Browse files Browse the repository at this point in the history
This was previously accepted by the compiler but is being phased out;
it will become a hard error in a future release! See https://github.com/
rust-lang/rust/issues/115010.
  • Loading branch information
Hywan committed Sep 6, 2023
1 parent d6f0635 commit f13282e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/matrix-sdk-base/src/store/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,10 @@ pub enum StateStoreDataKey<'a> {

impl StateStoreDataKey<'_> {
/// Key to use for the [`SyncToken`][Self::SyncToken] variant.
pub const SYNC_TOKEN: &str = "sync_token";
pub const SYNC_TOKEN: &'static str = "sync_token";
/// Key prefix to use for the [`Filter`][Self::Filter] variant.
pub const FILTER: &str = "filter";
pub const FILTER: &'static str = "filter";
/// Key prefix to use for the [`UserAvatarUrl`][Self::UserAvatarUrl]
/// variant.
pub const USER_AVATAR_URL: &str = "user_avatar_url";
pub const USER_AVATAR_URL: &'static str = "user_avatar_url";
}
2 changes: 1 addition & 1 deletion crates/matrix-sdk-crypto/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl std::fmt::Debug for OlmMachine {
}

impl OlmMachine {
const CURRENT_GENERATION_STORE_KEY: &str = "generation-counter";
const CURRENT_GENERATION_STORE_KEY: &'static str = "generation-counter";

/// Create a new memory based OlmMachine.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/matrix-sdk-ui/src/notification_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ pub struct NotificationClient {
}

impl NotificationClient {
const CONNECTION_ID: &str = "notifications";
const LOCK_ID: &str = "notifications";
const CONNECTION_ID: &'static str = "notifications";
const LOCK_ID: &'static str = "notifications";

/// Create a new builder for a notification client.
pub async fn builder(
Expand Down

0 comments on commit f13282e

Please sign in to comment.