Skip to content

Commit bb67150

Browse files
jplattepoljar
authored andcommitted
chore: Upgrade matrix-sdk-store-encryption to Rust Edition 2024
1 parent 471e3c3 commit bb67150

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

crates/matrix-sdk-store-encryption/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "matrix-sdk-store-encryption"
33
version = "0.13.0"
4-
edition = "2021"
4+
edition = "2024"
55
description = "Helpers for encrypted storage keys for the Matrix SDK"
66
repository = "https://github.com/matrix-org/matrix-rust-sdk"
77
license = "Apache-2.0"

crates/matrix-sdk-store-encryption/src/lib.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@
1919
use std::ops::DerefMut;
2020

2121
use base64::{
22-
alphabet,
23-
engine::{general_purpose, GeneralPurpose},
24-
Engine,
22+
Engine, alphabet,
23+
engine::{GeneralPurpose, general_purpose},
2524
};
26-
use blake3::{derive_key, Hash};
25+
use blake3::{Hash, derive_key};
2726
use chacha20poly1305::{
28-
aead::{Aead, Error as EncryptionError},
2927
Key as ChachaKey, KeyInit, XChaCha20Poly1305, XNonce,
28+
aead::{Aead, Error as EncryptionError},
3029
};
3130
use hmac::Hmac;
3231
use pbkdf2::pbkdf2;
33-
use rand::{thread_rng, Error as RandomError, Fill};
34-
use serde::{de::DeserializeOwned, Deserialize, Serialize};
32+
use rand::{Error as RandomError, Fill, thread_rng};
33+
use serde::{Deserialize, Serialize, de::DeserializeOwned};
3534
use sha2::Sha256;
3635
use zeroize::{Zeroize, ZeroizeOnDrop};
3736

@@ -815,7 +814,7 @@ struct EncryptedStoreCipher {
815814

816815
#[cfg(test)]
817816
mod tests {
818-
use serde_json::{json, Value};
817+
use serde_json::{Value, json};
819818

820819
use super::{Error, StoreCipher};
821820
use crate::{EncryptedValue, EncryptedValueBase64, EncryptedValueBase64DecodeError};

0 commit comments

Comments
 (0)