Rustify core/src/core (#1122)

Small refactoring of one folder, if it makes sense I could extend the scope.
* Remove some cloning (real and just verbosity in the code)
* Naming conventions like to/into*
* Some Clippy's suggestions

I found that we don't use field init shorthand syntax, so I didn't touch this part, was it discussed before?
This commit is contained in:
hashmap
2018-06-01 21:41:26 +02:00
committed by Yeastplume
parent 7812a02233
commit 2fa32d15ce
27 changed files with 215 additions and 263 deletions
+2 -2
View File
@@ -137,7 +137,7 @@ fn find_outputs_with_key<T: WalletBackend>(
None,
output.range_proof().unwrap(),
).unwrap();
let message = ProofMessageElements::from_proof_message(info.message).unwrap();
let message = ProofMessageElements::from_proof_message(&info.message).unwrap();
let value = message.value();
if value.is_err() {
continue;
@@ -175,7 +175,7 @@ fn find_outputs_with_key<T: WalletBackend>(
None,
output.range_proof().unwrap(),
).unwrap();
let message = ProofMessageElements::from_proof_message(info.message).unwrap();
let message = ProofMessageElements::from_proof_message(&info.message).unwrap();
let value = message.value();
if value.is_err() || !message.zeroes_correct() {
continue;