Moved to using checked arithmetic for Amounts. #351
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
ci.yml
on: push
Bitrot check
4m 6s
Lint
4m 42s
Nightly lint
21s
Intra-doc links
4m 38s
Rustfmt
14s
Security - Cargo Audit
5m 51s
Matrix: build
Matrix: test
Annotations
7 errors
Rustfmt
Process completed with exit code 1.
|
Nightly lint
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
this expression creates a reference which is immediately dereferenced by the compiler:
masp_primitives/src/transaction/components/amount.rs#L341
error: this expression creates a reference which is immediately dereferenced by the compiler
--> masp_primitives/src/transaction/components/amount.rs:341:69
|
341 | comps.insert(atype.clone(), self.get(atype).checked_sub(&amount).expect("overflow detected"));
| ^^^^^^^ help: change this to: `amount`
|
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
use of `unwrap_or` followed by a call to `default`:
masp_primitives/src/transaction/components/amount.rs#L100
error: use of `unwrap_or` followed by a call to `default`
--> masp_primitives/src/transaction/components/amount.rs:100:47
|
100 | let val = self.0.get(&index).copied().unwrap_or(Magnitude::default());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
= note: `-D clippy::or-fun-call` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
|
this expression creates a reference which is immediately dereferenced by the compiler:
masp_primitives/src/transaction/components/amount.rs#L341
error: this expression creates a reference which is immediately dereferenced by the compiler
--> masp_primitives/src/transaction/components/amount.rs:341:69
|
341 | comps.insert(atype.clone(), self.get(atype).checked_sub(&amount).expect("overflow detected"));
| ^^^^^^^ help: change this to: `amount`
|
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
use of `unwrap_or` followed by a call to `default`:
masp_primitives/src/transaction/components/amount.rs#L100
error: use of `unwrap_or` followed by a call to `default`
--> masp_primitives/src/transaction/components/amount.rs:100:47
|
100 | let val = self.0.get(&index).copied().unwrap_or(Magnitude::default());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
= note: `-D clippy::or-fun-call` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
|
Lint
Clippy had exited with the 101 exit code
|