Skip to content

Commit cebcb0c

Browse files
committed
clippy: ignore result_large_err clippy lint for Tablet::from_raw_tablet
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. ```
1 parent f9a3635 commit cebcb0c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scylla/src/transport/locator/tablets.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ pub(crate) struct Tablet {
210210
}
211211

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

0 commit comments

Comments
 (0)