Skip to content

Commit cc84079

Browse files
committed
chore: fix clippy lints
1 parent 9db17e1 commit cc84079

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/interface/rgb20.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,11 @@ pub enum AmountChange {
261261
impl StateChange for AmountChange {
262262
type State = Amount;
263263

264-
fn from_spent(state: Self::State) -> Self { AmountChange::Dec(state.into()) }
264+
fn from_spent(state: Self::State) -> Self { AmountChange::Dec(state) }
265265

266-
fn from_received(state: Self::State) -> Self { AmountChange::Inc(state.into()) }
266+
fn from_received(state: Self::State) -> Self { AmountChange::Inc(state) }
267267

268-
fn merge_spent(&mut self, state: Self::State) {
269-
let sub = Amount::from(state);
268+
fn merge_spent(&mut self, sub: Self::State) {
270269
*self = match self {
271270
AmountChange::Dec(neg) => AmountChange::Dec(*neg + sub),
272271
AmountChange::Zero => AmountChange::Dec(sub),
@@ -277,8 +276,7 @@ impl StateChange for AmountChange {
277276
};
278277
}
279278

280-
fn merge_received(&mut self, state: Self::State) {
281-
let add = Amount::from(state);
279+
fn merge_received(&mut self, add: Self::State) {
282280
*self = match self {
283281
AmountChange::Inc(pos) => AmountChange::Inc(*pos + add),
284282
AmountChange::Zero => AmountChange::Inc(add),

src/stl/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use amplify::IoError;
2323
use baid58::Baid58ParseError;
2424
use strict_types::{typesys, CompileError};
2525

26+
#[allow(dead_code)]
2627
#[derive(Debug, From)]
2728
pub(super) enum Error {
2829
#[from(std::io::Error)]

0 commit comments

Comments
 (0)