Skip to content

Commit

Permalink
chore: fix clippy 1.84 (#4319)
Browse files Browse the repository at this point in the history
* chore: remove not used lifetimes

* chore: remove redundant as_bytes() when getting len

* chore: bump versions
  • Loading branch information
fraidev authored Jan 14, 2025
1 parent 4421353 commit 4cd4f7d
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fluvio-compression/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-compression/src/gzip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-compression/src/lz4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-compression/src/snappy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-compression/src/zstd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-stream-model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fluvio-stream-model"
edition = "2021"
version = "0.11.4"
version = "0.11.5"
authors = ["Fluvio Contributors <[email protected]>"]
description = "Fluvio Event Stream Model"
repository = "https://github.com/infinyon/fluvio"
Expand Down
8 changes: 4 additions & 4 deletions crates/fluvio-stream-model/src/store/concurrent_hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ where
lock.insert(key, value)
}

pub async fn read<'a>(&'_ self) -> RwLockReadGuard<'_, HashMap<K, V>> {
pub async fn read(&'_ self) -> RwLockReadGuard<'_, HashMap<K, V>> {
self.0.read().await
}

pub async fn write<'a>(&'_ self) -> RwLockWriteGuard<'_, HashMap<K, V>> {
pub async fn write(&'_ self) -> RwLockWriteGuard<'_, HashMap<K, V>> {
self.0.write().await
}

Expand Down Expand Up @@ -69,11 +69,11 @@ where
Self(RwLock::new(map))
}

pub async fn read<'a>(&'_ self) -> RwLockReadGuard<'_, BTreeMap<K, V>> {
pub async fn read(&'_ self) -> RwLockReadGuard<'_, BTreeMap<K, V>> {
self.0.read().await
}

pub async fn write<'a>(&'_ self) -> RwLockWriteGuard<'_, BTreeMap<K, V>> {
pub async fn write(&'_ self) -> RwLockWriteGuard<'_, BTreeMap<K, V>> {
self.0.write().await
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fluvio-stream-model/src/store/dual_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ where

/// Read guard
#[inline(always)]
pub async fn read<'a>(
pub async fn read(
&'_ self,
) -> RwLockReadGuard<'_, DualEpochMap<S::IndexKey, MetadataStoreObject<S, C>>> {
self.store.read().await
}

/// write guard, this is private, use sync API to make changes
#[inline(always)]
async fn write<'a>(
async fn write(
&'_ self,
) -> RwLockWriteGuard<'_, DualEpochMap<S::IndexKey, MetadataStoreObject<S, C>>> {
self.store.write().await
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fluvio"
version = "0.24.2"
version = "0.24.3"
edition = "2021"
license = "Apache-2.0"
authors = ["Fluvio Contributors <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio/src/producer/partition_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4cd4f7d

Please sign in to comment.