Skip to content

Commit e4599fc

Browse files
committed
Make clippy happy
1 parent 7e1856b commit e4599fc

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

diesel/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#[macro_use]
3333
extern crate bitflags;
3434
extern crate byteorder;
35+
// This is required to make `diesel_derives` re-export, but clippy thinks its unused
36+
#[cfg_attr(feature = "clippy", allow(useless_attribute))]
3537
#[allow(unused_imports)]
3638
#[macro_use]
3739
extern crate diesel_derives;

diesel/src/pg/types/numeric.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ mod bigdecimal {
127127
// First digit got factor 10_000^(digits.len() - 1), but should get 10_000^weight
128128
let correction_exp = 4 * (i64::from(weight) - count + 1);
129129
let result = BigDecimal::new(BigInt::from_biguint(sign, result), -correction_exp)
130-
.with_scale(scale as i64);
130+
.with_scale(i64::from(scale));
131131
Ok(result)
132132
}
133133
}

diesel_infer_schema/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
warn(wrong_pub_self_convention, mut_mut, non_ascii_literal, similar_names,
1010
unicode_not_nfc, if_not_else, items_after_statements, used_underscore_binding))]
1111

12+
#[cfg_attr(feature = "clippy", allow(useless_attribute))]
1213
#[allow(unused_imports)]
1314
#[macro_use]
1415
extern crate infer_schema_macros;

diesel_migrations/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
unicode_not_nfc, if_not_else, items_after_statements, used_underscore_binding))]
1111

1212
extern crate migrations_internals;
13+
#[cfg_attr(feature = "clippy", allow(useless_attribute))]
1314
#[allow(unused_imports)]
1415
#[macro_use]
1516
extern crate migrations_macros;

0 commit comments

Comments
 (0)