Skip to content

Commit f13282e

Browse files
committed
fix: & without an explicit lifetime name cannot be used here.
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.
1 parent d6f0635 commit f13282e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

crates/matrix-sdk-base/src/store/traits.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -824,10 +824,10 @@ pub enum StateStoreDataKey<'a> {
824824

825825
impl StateStoreDataKey<'_> {
826826
/// Key to use for the [`SyncToken`][Self::SyncToken] variant.
827-
pub const SYNC_TOKEN: &str = "sync_token";
827+
pub const SYNC_TOKEN: &'static str = "sync_token";
828828
/// Key prefix to use for the [`Filter`][Self::Filter] variant.
829-
pub const FILTER: &str = "filter";
829+
pub const FILTER: &'static str = "filter";
830830
/// Key prefix to use for the [`UserAvatarUrl`][Self::UserAvatarUrl]
831831
/// variant.
832-
pub const USER_AVATAR_URL: &str = "user_avatar_url";
832+
pub const USER_AVATAR_URL: &'static str = "user_avatar_url";
833833
}

crates/matrix-sdk-crypto/src/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl std::fmt::Debug for OlmMachine {
144144
}
145145

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

149149
/// Create a new memory based OlmMachine.
150150
///

crates/matrix-sdk-ui/src/notification_client.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ pub struct NotificationClient {
9898
}
9999

100100
impl NotificationClient {
101-
const CONNECTION_ID: &str = "notifications";
102-
const LOCK_ID: &str = "notifications";
101+
const CONNECTION_ID: &'static str = "notifications";
102+
const LOCK_ID: &'static str = "notifications";
103103

104104
/// Create a new builder for a notification client.
105105
pub async fn builder(

0 commit comments

Comments
 (0)