Skip to content

Commit cc1da1d

Browse files
committed
Clippy
1 parent 01013e4 commit cc1da1d

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/db.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl LotDisposalKind {
384384
LotDisposalKind::Other { .. }
385385
| LotDisposalKind::Swap { .. }
386386
| LotDisposalKind::WithdrawalFee { .. }
387-
| LotDisposalKind::Fiat { .. } => None,
387+
| LotDisposalKind::Fiat => None,
388388
}
389389
}
390390
}
@@ -685,9 +685,8 @@ impl DbData {
685685
fn load(filename: &Path) -> io::Result<Self> {
686686
let bytes = fs::read(filename)?;
687687

688-
serde_json::from_str(std::str::from_utf8(&bytes).expect("invalid utf8")).map_err(|err| {
689-
io::Error::new(io::ErrorKind::Other, format!("JSON parse failed: {err:?}"))
690-
})
688+
serde_json::from_str(std::str::from_utf8(&bytes).expect("invalid utf8"))
689+
.map_err(|err| io::Error::other(format!("JSON parse failed: {err:?}")))
691690
}
692691

693692
fn save(&self, filename: &Path) -> io::Result<()> {

src/vendor/kamino/fraction.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pub enum LendingError {
77

88
#[allow(clippy::assign_op_pattern)]
99
#[allow(clippy::reversed_empty_ranges)]
10+
#[allow(clippy::manual_div_ceil)]
1011
mod uint_types {
1112
use uint::construct_uint;
1213
construct_uint! {

src/vendor/solend/math/decimal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use std::{convert::TryFrom, fmt};
2121
use uint::construct_uint;
2222

2323
// U192 with 192 bits consisting of 3 x 64-bit words
24+
#[allow(clippy::manual_div_ceil)]
2425
construct_uint! {
2526
pub struct U192(3);
2627
}

src/vendor/solend/math/rate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use std::{convert::TryFrom, fmt};
2727
use uint::construct_uint;
2828

2929
// U128 with 128 bits consisting of 2 x 64-bit words
30+
#[allow(clippy::manual_div_ceil)]
3031
construct_uint! {
3132
pub struct U128(2);
3233
}

0 commit comments

Comments
 (0)