diff --git a/Cargo.lock b/Cargo.lock index 97ab552601..d9f7b295aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2373,7 +2373,7 @@ dependencies = [ [[package]] name = "fluvio" -version = "0.24.2" +version = "0.24.3" dependencies = [ "anyhow", "async-channel 1.9.0", @@ -2640,7 +2640,7 @@ dependencies = [ [[package]] name = "fluvio-compression" -version = "0.3.4" +version = "0.3.5" dependencies = [ "bytes", "flate2", @@ -3224,7 +3224,7 @@ dependencies = [ [[package]] name = "fluvio-stream-model" -version = "0.11.4" +version = "0.11.5" dependencies = [ "async-lock 3.4.0", "event-listener 5.3.1", diff --git a/crates/fluvio-compression/Cargo.toml b/crates/fluvio-compression/Cargo.toml index a8b04702ae..6fd6ad761e 100644 --- a/crates/fluvio-compression/Cargo.toml +++ b/crates/fluvio-compression/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fluvio-compression" -version = "0.3.4" +version = "0.3.5" edition = "2021" license = "Apache-2.0" authors = ["Fluvio Contributors "] diff --git a/crates/fluvio-compression/src/gzip.rs b/crates/fluvio-compression/src/gzip.rs index e01f297fc2..15a0e25b37 100644 --- a/crates/fluvio-compression/src/gzip.rs +++ b/crates/fluvio-compression/src/gzip.rs @@ -30,7 +30,7 @@ mod tests { let text = "FLUVIO_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; let compressed = compress(text.as_bytes()).unwrap(); - assert!(compressed.len() < text.as_bytes().len()); + assert!(compressed.len() < text.len()); let uncompressed = String::from_utf8(uncompress(compressed.reader()).unwrap()).unwrap(); diff --git a/crates/fluvio-compression/src/lz4.rs b/crates/fluvio-compression/src/lz4.rs index d09581628c..521ec21fae 100644 --- a/crates/fluvio-compression/src/lz4.rs +++ b/crates/fluvio-compression/src/lz4.rs @@ -28,7 +28,7 @@ mod tests { let text = "FLUVIO_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; let compressed = compress(text.as_bytes()).unwrap(); - assert!(compressed.len() < text.as_bytes().len()); + assert!(compressed.len() < text.len()); let uncompressed = String::from_utf8(uncompress(compressed.reader()).unwrap()).unwrap(); diff --git a/crates/fluvio-compression/src/snappy.rs b/crates/fluvio-compression/src/snappy.rs index 21bc3fc911..963e906198 100644 --- a/crates/fluvio-compression/src/snappy.rs +++ b/crates/fluvio-compression/src/snappy.rs @@ -31,7 +31,7 @@ mod tests { let text = "FLUVIO_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; let compressed = compress(text.as_bytes()).unwrap(); - assert!(compressed.len() < text.as_bytes().len()); + assert!(compressed.len() < text.len()); let uncompressed = String::from_utf8(uncompress(compressed.reader()).unwrap()).unwrap(); diff --git a/crates/fluvio-compression/src/zstd.rs b/crates/fluvio-compression/src/zstd.rs index 8a532a27f9..343f3a171e 100644 --- a/crates/fluvio-compression/src/zstd.rs +++ b/crates/fluvio-compression/src/zstd.rs @@ -28,7 +28,7 @@ mod tests { let text = "FLUVIO_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; let compressed = compress(text.as_bytes()).unwrap(); - assert!(compressed.len() < text.as_bytes().len()); + assert!(compressed.len() < text.len()); let uncompressed = String::from_utf8(uncompress(compressed.reader()).unwrap()).unwrap(); diff --git a/crates/fluvio-stream-model/Cargo.toml b/crates/fluvio-stream-model/Cargo.toml index 566ce6a5ec..9b7103ac7a 100644 --- a/crates/fluvio-stream-model/Cargo.toml +++ b/crates/fluvio-stream-model/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "fluvio-stream-model" edition = "2021" -version = "0.11.4" +version = "0.11.5" authors = ["Fluvio Contributors "] description = "Fluvio Event Stream Model" repository = "https://github.com/infinyon/fluvio" diff --git a/crates/fluvio-stream-model/src/store/concurrent_hashmap.rs b/crates/fluvio-stream-model/src/store/concurrent_hashmap.rs index 273536b444..271b4cbc72 100644 --- a/crates/fluvio-stream-model/src/store/concurrent_hashmap.rs +++ b/crates/fluvio-stream-model/src/store/concurrent_hashmap.rs @@ -23,11 +23,11 @@ where lock.insert(key, value) } - pub async fn read<'a>(&'_ self) -> RwLockReadGuard<'_, HashMap> { + pub async fn read(&'_ self) -> RwLockReadGuard<'_, HashMap> { self.0.read().await } - pub async fn write<'a>(&'_ self) -> RwLockWriteGuard<'_, HashMap> { + pub async fn write(&'_ self) -> RwLockWriteGuard<'_, HashMap> { self.0.write().await } @@ -69,11 +69,11 @@ where Self(RwLock::new(map)) } - pub async fn read<'a>(&'_ self) -> RwLockReadGuard<'_, BTreeMap> { + pub async fn read(&'_ self) -> RwLockReadGuard<'_, BTreeMap> { self.0.read().await } - pub async fn write<'a>(&'_ self) -> RwLockWriteGuard<'_, BTreeMap> { + pub async fn write(&'_ self) -> RwLockWriteGuard<'_, BTreeMap> { self.0.write().await } diff --git a/crates/fluvio-stream-model/src/store/dual_store.rs b/crates/fluvio-stream-model/src/store/dual_store.rs index 96c599a90b..902cc36204 100644 --- a/crates/fluvio-stream-model/src/store/dual_store.rs +++ b/crates/fluvio-stream-model/src/store/dual_store.rs @@ -74,7 +74,7 @@ where /// Read guard #[inline(always)] - pub async fn read<'a>( + pub async fn read( &'_ self, ) -> RwLockReadGuard<'_, DualEpochMap>> { self.store.read().await @@ -82,7 +82,7 @@ where /// write guard, this is private, use sync API to make changes #[inline(always)] - async fn write<'a>( + async fn write( &'_ self, ) -> RwLockWriteGuard<'_, DualEpochMap>> { self.store.write().await diff --git a/crates/fluvio/Cargo.toml b/crates/fluvio/Cargo.toml index 31b4d1e6b6..d6474aeffa 100644 --- a/crates/fluvio/Cargo.toml +++ b/crates/fluvio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fluvio" -version = "0.24.2" +version = "0.24.3" edition = "2021" license = "Apache-2.0" authors = ["Fluvio Contributors "] diff --git a/crates/fluvio/src/producer/partition_producer.rs b/crates/fluvio/src/producer/partition_producer.rs index 432106ff3a..fab984842a 100644 --- a/crates/fluvio/src/producer/partition_producer.rs +++ b/crates/fluvio/src/producer/partition_producer.rs @@ -167,7 +167,7 @@ where let mut batches = self.batches_lock.batches.lock().await; while !batches.is_empty() { let ready = force - || batches.front().map_or(false, |batch| { + || batches.front().is_some_and(|batch| { batch.is_full() || batch.elapsed() as u128 >= self.config.linger.as_millis() }); if ready {