Skip to content

Commit

Permalink
clippy: ignore result_large_err clippy lint for Tablet::from_raw_tablet
Browse files Browse the repository at this point in the history
See: https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

I justified this decision in the code:
```
// Ignore clippy lints here. Clippy suggests to
// Box<> `Err`` variant, because it's too large. It does not
// make much sense to do so, looking at the caller of this function.
// Tablet returned in `Err` variant is used as if no error appeared.
// The only difference is that we use node ids to emit some debug logs.
```
  • Loading branch information
muzarski committed Oct 21, 2024
1 parent f9a3635 commit cebcb0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scylla/src/transport/locator/tablets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ pub(crate) struct Tablet {
}

impl Tablet {
// Ignore clippy lints here. Clippy suggests to
// Box<> `Err` variant, because it's too large. It does not
// make much sense to do so, looking at the caller of this function.
// Tablet returned in `Err` variant is used as if no error appeared.
// The only difference is that we use node ids to emit some debug logs.
#[allow(clippy::result_large_err)]
pub(crate) fn from_raw_tablet(
raw_tablet: RawTablet,
replica_translator: impl Fn(Uuid) -> Option<Arc<Node>>,
Expand Down

0 comments on commit cebcb0c

Please sign in to comment.