Skip to content

Commit db71122

Browse files
committed
Remove redundant clippy attributes
Some checks stopped triggering since we introduced those lines, for one reason or another. There is no need to keep them.
1 parent 3da5d8b commit db71122

File tree

15 files changed

+5
-36
lines changed

15 files changed

+5
-36
lines changed

scylla-cql/src/deserialize/result.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@ mod tests {
256256
fn lend_next(&mut self) -> Option<Result<Self::Item<'_>, DeserializationError>>;
257257
}
258258

259-
// Disable the lint, if there is more than one lifetime included.
260-
// Can be removed once https://github.com/rust-lang/rust-clippy/issues/12495 is fixed.
261-
#[allow(clippy::needless_lifetimes)]
262259
impl<'frame, 'metadata> LendingIterator for RawRowIterator<'frame, 'metadata> {
263260
type Item<'borrow>
264261
= ColumnIterator<'borrow, 'borrow>

scylla-cql/src/deserialize/row_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ fn test_deserialization_as_column_iterator() {
8484
// Do not remove. It's not used in tests but we keep it here to check that
8585
// we properly ignore warnings about unused variables, unnecessary `mut`s
8686
// etc. that usually pop up when generating code for empty structs.
87-
#[allow(unused)]
8887
#[derive(DeserializeRow)]
8988
#[scylla(crate = crate)]
9089
struct TestUdtWithNoFieldsUnordered {}
9190

92-
#[allow(unused)]
9391
#[derive(DeserializeRow)]
9492
#[scylla(crate = crate, flavor = "enforce_order")]
9593
struct TestUdtWithNoFieldsOrdered {}

scylla-cql/src/deserialize/value_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,12 +1200,10 @@ impl UdtSerializer {
12001200
// Do not remove. It's not used in tests but we keep it here to check that
12011201
// we properly ignore warnings about unused variables, unnecessary `mut`s
12021202
// etc. that usually pop up when generating code for empty structs.
1203-
#[allow(unused)]
12041203
#[derive(scylla_macros::DeserializeValue)]
12051204
#[scylla(crate = crate)]
12061205
struct TestUdtWithNoFieldsUnordered {}
12071206

1208-
#[allow(unused)]
12091207
#[derive(scylla_macros::DeserializeValue)]
12101208
#[scylla(crate = crate, flavor = "enforce_order")]
12111209
struct TestUdtWithNoFieldsOrdered {}

scylla-cql/src/frame/request/batch.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@ impl BatchStatement<'_> {
226226
}
227227
}
228228

229-
// Disable the lint, if there is more than one lifetime included.
230-
// Can be removed once https://github.com/rust-lang/rust-clippy/issues/12495 is fixed.
231-
#[allow(clippy::needless_lifetimes)]
232229
impl<'s, 'b> From<&'s BatchStatement<'b>> for BatchStatement<'s> {
233230
fn from(value: &'s BatchStatement) -> Self {
234231
match value {

scylla-cql/src/serialize/batch_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ fn tuple_batch_values() {
320320
}
321321

322322
#[test]
323-
#[allow(clippy::needless_borrow)]
324323
fn ref_batch_values() {
325324
let batch_values: &[&[i8]] = &[&[1, 2], &[2, 3, 4, 5], &[6]];
326325
let cols = &[
@@ -338,7 +337,6 @@ fn ref_batch_values() {
338337
}
339338

340339
#[test]
341-
#[allow(clippy::needless_borrow)]
342340
fn check_ref_tuple() {
343341
fn assert_has_batch_values<BV: BatchValues>(bv: BV, cols: &[&[ColumnSpec]]) {
344342
let mut iter = make_batch_value_iter(&bv);

scylla-cql/src/serialize/row_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ fn test_dyn_serialize_row() {
9494
#[test]
9595
fn test_tuple_errors() {
9696
// Unit
97-
#[allow(clippy::let_unit_value)] // The let binding below is intentional
9897
let v = ();
9998
let spec = [col("a", ColumnType::Native(NativeType::Text))];
10099
let err = do_serialize_err(v, &spec);
@@ -224,7 +223,6 @@ fn test_map_errors() {
224223
// Do not remove. It's not used in tests but we keep it here to check that
225224
// we properly ignore warnings about unused variables, unnecessary `mut`s
226225
// etc. that usually pop up when generating code for empty structs.
227-
#[allow(unused)]
228226
#[derive(SerializeRow)]
229227
#[scylla(crate = crate)]
230228
struct TestRowWithNoColumns {}

scylla-macros/src/deserialize/row.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ impl DeserializeAssumeOrderGenerator<'_> {
322322

323323
parse_quote! {
324324
fn deserialize(
325-
#[allow(unused_mut)]
326325
mut row: #macro_internal::ColumnIterator<#frame_lifetime, #metadata_lifetime>,
327326
) -> ::std::result::Result<Self, #macro_internal::DeserializationError> {
328327
::std::result::Result::Ok(Self {
@@ -576,8 +575,7 @@ impl DeserializeUnorderedGenerator<'_> {
576575

577576
parse_quote! {
578577
fn deserialize(
579-
#[allow(unused_mut)]
580-
mut row: #macro_internal::ColumnIterator<#frame_lifetime, #metadata_lifetime>,
578+
row: #macro_internal::ColumnIterator<#frame_lifetime, #metadata_lifetime>,
581579
) -> ::std::result::Result<Self, #macro_internal::DeserializationError> {
582580

583581
// Generate fields that will serve as temporary storage

scylla-macros/src/deserialize/value.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,7 @@ impl DeserializeAssumeOrderGenerator<'_> {
536536
let field_idents = fields.iter().map(|f| f.ident.as_ref().unwrap());
537537
let field_finalizers = fields.iter().map(|f| self.generate_finalize_field(f));
538538

539-
#[allow(unused_mut)]
540-
let mut iterator_type: syn::Type =
539+
let iterator_type: syn::Type =
541540
parse_quote!(#macro_internal::UdtIterator<#frame_lifetime, #metadata_lifetime>);
542541

543542
parse_quote! {

scylla/src/cloud/config.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ pub enum CloudTlsProvider {
168168
#[derive(Debug)]
169169
pub(crate) struct AuthInfo {
170170
tls: TlsInfo,
171-
#[allow(unused)]
172171
username: Option<String>,
173-
#[allow(unused)]
174172
password: Option<String>,
175173
}
176174

@@ -282,11 +280,9 @@ impl AuthInfo {
282280
pub(crate) struct Datacenter {
283281
ca_cert: TlsCert,
284282
server: String,
285-
#[allow(unused)]
286283
tls_server_name: Option<String>,
287284
node_domain: String,
288285
insecure_skip_tls_verify: bool,
289-
#[allow(unused)]
290286
proxy_url: Option<String>,
291287
}
292288

scylla/src/cluster/metadata.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ impl std::str::FromStr for ColumnKind {
359359

360360
#[derive(Clone, Debug, PartialEq, Eq)]
361361
#[non_exhaustive]
362-
#[allow(clippy::enum_variant_names)]
363362
pub enum Strategy {
364363
SimpleStrategy {
365364
replication_factor: usize,

0 commit comments

Comments
 (0)