From cebcb0cd50b4aa7589b9aa6745a01917b4c61478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Uzarski?= Date: Mon, 21 Oct 2024 11:34:59 +0200 Subject: [PATCH] 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. ``` --- scylla/src/transport/locator/tablets.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scylla/src/transport/locator/tablets.rs b/scylla/src/transport/locator/tablets.rs index 6edd98dad8..0f959059c1 100644 --- a/scylla/src/transport/locator/tablets.rs +++ b/scylla/src/transport/locator/tablets.rs @@ -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>,