chore: localy disable some lints

- clippy::nonminimal_bool disabled for check_size_filter function
clippy message: this boolean expression can be simplified
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#nonminimal_bool
- clippy::large_enum_variant for `DecryptStreamState` and `State`
- clippy::too_many_arguments for `put_block_and_meta` and
  `test_read_encrypted`
- clippy::deref_addrof for specific unsafe code
- clippy::doc_overindented_list_items and clippy::doc_lazy_continuation
This commit is contained in:
Gwen Lg
2025-12-14 18:47:44 +01:00
parent 4a0be692b3
commit b0ee7dd3c9
6 changed files with 11 additions and 1 deletions
+1
View File
@@ -508,6 +508,7 @@ struct DecryptStream {
state: DecryptStreamState,
}
#[expect(clippy::large_enum_variant)]
enum DecryptStreamState {
Starting,
Running(DecryptorLE31<Aes256Gcm>),
+1
View File
@@ -554,6 +554,7 @@ pub(crate) async fn read_and_put_blocks<S: Stream<Item = Result<Bytes, Error>> +
Ok((total_size, checksums, first_block_hash))
}
#[expect(clippy::too_many_arguments)]
async fn put_block_and_meta(
ctx: &ReqCtx,
version: &Version,
+4 -1
View File
@@ -395,7 +395,10 @@ where
// this reference will only be stored and accessed from the
// returned ValueIter which guarantees that it is destroyed
// before the tx it is pointing to.
unsafe { &*&raw const *tx }
#[expect(clippy::deref_addrof)]
unsafe {
&*&raw const *tx
}
};
let iter = iterfun(tx_lifetime_overextended)?;
+1
View File
@@ -399,6 +399,7 @@ async fn test_multipart_upload() {
}
}
#[expect(clippy::too_many_arguments)]
async fn test_read_encrypted(
ctx: &Context,
bucket: &str,
+2
View File
@@ -41,6 +41,7 @@ pub struct LifecycleWorker {
persister: PersisterShared<LifecycleWorkerPersisted>,
}
#[expect(clippy::large_enum_variant)]
enum State {
Completed(NaiveDate),
Running {
@@ -368,6 +369,7 @@ async fn process_object(
Ok(Skip::NextObject)
}
#[expect(clippy::nonminimal_bool)]
fn check_size_filter(version_data: &ObjectVersionData, filter: &LifecycleFilter) -> bool {
let size = match version_data {
ObjectVersionData::Inline(meta, _) | ObjectVersionData::FirstBlock(meta, _) => meta.size,
+2
View File
@@ -540,6 +540,8 @@ impl RpcHelper {
// ---- functions not related to MAKING RPCs, but just determining to what nodes
// they should be made and in which order ----
#[expect(clippy::doc_overindented_list_items)]
#[expect(clippy::doc_lazy_continuation)]
/// Determine to what nodes, and in what order, requests to read a data block
/// should be sent. All nodes in the Vec returned by this function are tried
/// one by one until there is one that returns the block (in block/manager.rs).