diff --git a/examples/read_csv_in_tar.rs b/examples/read_csv_in_tar.rs index c33497b..91b1e5d 100644 --- a/examples/read_csv_in_tar.rs +++ b/examples/read_csv_in_tar.rs @@ -12,7 +12,7 @@ fn main() { let mut entry = entry.unwrap(); let path = entry.path().unwrap().to_string_lossy().to_string(); if path.ends_with("csv") { - println!("found file {}", &path); + println!("found file {path}"); println!("reading content now... (sleep for 3 seconds)"); sleep(Duration::from_secs(3)); let mut content: String = String::default(); diff --git a/src/s3/mod.rs b/src/s3/mod.rs index 11797aa..2570ebe 100644 --- a/src/s3/mod.rs +++ b/src/s3/mod.rs @@ -1410,7 +1410,7 @@ mod tests { let (cs, tp) = calculate_chunk_size(hundred_gb, chunk_size); assert!(tp <= 10_000); assert!(cs >= 8 * 1024 * 1024); - assert_eq!(tp, ((hundred_gb + cs - 1) / cs) as usize); + assert_eq!(tp, hundred_gb.div_ceil(cs) as usize); } #[test] diff --git a/tests/basic_integration.rs b/tests/basic_integration.rs index a509b29..1a2a82f 100644 --- a/tests/basic_integration.rs +++ b/tests/basic_integration.rs @@ -224,7 +224,7 @@ FZr4y1T605mmkIwGPQ== #[test] fn test_file_extension_plain() { - assert_eq!(oneio::get_reader("tests/test_data.txt").is_ok(), true); + assert!(oneio::get_reader("tests/test_data.txt").is_ok()); } #[cfg(feature = "any_gz")] diff --git a/tests/s3_large_upload.rs b/tests/s3_large_upload.rs index 51c3d14..cbaeaed 100644 --- a/tests/s3_large_upload.rs +++ b/tests/s3_large_upload.rs @@ -32,7 +32,7 @@ fn test_large_multipart_upload() { ); println!( "Expected parts: {} (at 8MB chunks)", - (size + 8 * 1024 * 1024 - 1) / (8 * 1024 * 1024) + size.div_ceil(8 * 1024 * 1024) ); let unique_id = std::time::SystemTime::now()