Skip to content

Commit

Permalink
Cleaning with clippy, fmt and udeps
Browse files Browse the repository at this point in the history
  • Loading branch information
vphongph committed Feb 21, 2025
1 parent 395ef52 commit a4d55ef
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ python = [
aes = "~0.8.1"
bincode = "~1.3.3"
hex = "~0.4.3"
lazy_static = "1.4.0"
rand = "~0.8.5"
rand_chacha = "~0.3.1"
rayon = "1.5.1"
thiserror = "1.0"
num_cpus = "1.13.0"
itertools = "~0.10.0"
tempfile = "3.6.0"
xor_name = "5.0.0"
pyo3 = { version = "=0.20.3", optional = true, features = ["extension-module"] }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub use xor_name;
/// The minimum size (before compression) of data to be self-encrypted, defined as 3B.
pub const MIN_ENCRYPTABLE_BYTES: usize = 3 * MIN_CHUNK_SIZE;
/// The maximum size (before compression) of an individual chunk of a file, defined as 4MiB.
const MAX_CHUNK_SIZE:usize = 4 * 1024 * 1024;
const MAX_CHUNK_SIZE: usize = 4 * 1024 * 1024;

/// The minimum size (before compression) of an individual chunk of a file, defined as 1B.
pub const MIN_CHUNK_SIZE: usize = 1;
Expand Down
1 change: 1 addition & 0 deletions src/python.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(non_local_definitions)]
use crate::{
decrypt_from_storage as rust_decrypt_from_storage, encrypt_from_file as rust_encrypt_from_file,
streaming_decrypt_from_storage as rust_streaming_decrypt_from_storage, ChunkInfo, DataMap,
Expand Down
2 changes: 1 addition & 1 deletion src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ mod tests {

// Create an invalid chunk with random content
let invalid_chunk = EncryptedChunk {
content: Bytes::from(random_bytes(1024)),
content: random_bytes(1024),
};

// Try to decrypt with invalid chunk
Expand Down

0 comments on commit a4d55ef

Please sign in to comment.