diff --git a/mountpoint-s3/Cargo.toml b/mountpoint-s3/Cargo.toml index 012d1f180..3d889d910 100644 --- a/mountpoint-s3/Cargo.toml +++ b/mountpoint-s3/Cargo.toml @@ -59,8 +59,6 @@ fuse_tests = [] s3_tests = [] shuttle = [] delete = [] -# A temporary feature flag to enable read-path checksums while we are working to improve its performance -checksum = [] [build-dependencies] built = { version = "0.6.0", features = ["git2"] } diff --git a/mountpoint-s3/src/prefetch/checksummed_bytes.rs b/mountpoint-s3/src/prefetch/checksummed_bytes.rs index 91ac6124c..37363904e 100644 --- a/mountpoint-s3/src/prefetch/checksummed_bytes.rs +++ b/mountpoint-s3/src/prefetch/checksummed_bytes.rs @@ -25,7 +25,6 @@ impl ChecksummedBytes { /// /// Return `IntegrityError` on data corruption. pub fn into_bytes(self) -> Result { - #[cfg(feature = "checksum")] self.validate()?; Ok(self.curr_slice) @@ -72,7 +71,6 @@ impl ChecksummedBytes { let new_checksummed_bytes = ChecksummedBytes::new(new_bytes, new_checksum); // Validate data integrity with checksum bracketing. - #[cfg(feature = "checksum")] { // 1. repeat the operation, which means copying into a new buffer in this case. let mut bytes_mut_dup = BytesMut::with_capacity(total_len); @@ -145,7 +143,6 @@ mod tests { assert_eq!(expected, actual); } - #[cfg(feature = "checksum")] #[test] fn test_into_bytes_integrity_error() { let bytes = Bytes::from_static(b"some bytes"); @@ -209,8 +206,7 @@ mod tests { let actual = checksummed_bytes.curr_slice; assert_eq!(expected, actual); } - - #[cfg(feature = "checksum")] + #[test] fn test_extend_self_corrupted() { let bytes = Bytes::from_static(b"some bytes"); @@ -228,7 +224,6 @@ mod tests { assert!(matches!(result, Err(IntegrityError::ChecksumMismatch(_, _)))); } - #[cfg(feature = "checksum")] #[test] fn test_extend_other_corrupted() { let bytes = Bytes::from_static(b"some bytes");