declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel
2022-08-15 20:38:36 +01:00
committed by GitHub
parent 9c2a2495fe
commit a68a80fbae
72 changed files with 344 additions and 512 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ fn test_calculate_for_fraction_times_denominator() {
};
pub fn formal_calculate_for_fraction_times_denominator(n: u64, d: u64) -> u64 {
if n <= Perbill::from_parts(0_500_000_000) * d.clone() {
if n <= Perbill::from_parts(0_500_000_000) * d {
n + d / 2
} else {
(d as u128 * 2 - n as u128 * 2).try_into().unwrap()
+1 -1
View File
@@ -1118,7 +1118,7 @@ mod tests {
ext.insert(b"c".to_vec(), vec![3u8; 33]);
ext.insert(b"d".to_vec(), vec![4u8; 33]);
let pre_root = ext.backend.root().clone();
let pre_root = *ext.backend.root();
let (_, proof) = ext.execute_and_prove(|| {
sp_io::storage::get(b"a");
sp_io::storage::get(b"b");