Skip to content

Commit 2d439f0

Browse files
Allow some clippy::unnecessary_cast warnings
Some casts are needed one platform but not another, so just silence this warning in a couple places.
1 parent 739036c commit 2d439f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ pub mod argument {
244244

245245
impl From<SignedInt> for i64 {
246246
fn from(num: SignedInt) -> Self {
247+
// Some casts are only needed on some platforms.
248+
#[allow(clippy::unnecessary_cast)]
247249
match num {
248250
SignedInt::Int(x) => x as i64,
249251
SignedInt::Char(x) => x as i64,
@@ -294,6 +296,8 @@ pub mod argument {
294296

295297
impl From<UnsignedInt> for u64 {
296298
fn from(num: UnsignedInt) -> Self {
299+
// Some casts are only needed on some platforms.
300+
#[allow(clippy::unnecessary_cast)]
297301
match num {
298302
UnsignedInt::Int(x) => x as u64,
299303
UnsignedInt::Char(x) => x as u64,

0 commit comments

Comments
 (0)