mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-10 23:13:18 +00:00
clippy
This commit is contained in:
parent
7d23983309
commit
04f6474799
@ -1,4 +1,4 @@
|
||||
use nssa_core::account::{Account, AccountWithMetadata};
|
||||
use nssa_core::account::AccountWithMetadata;
|
||||
use risc0_zkvm::guest::env;
|
||||
|
||||
/// A transfer of balance program.
|
||||
|
||||
@ -29,7 +29,7 @@ impl PublicKey {
|
||||
}
|
||||
|
||||
impl Signature {
|
||||
pub(crate) fn new(key: &PrivateKey, message: &[u8]) -> Self {
|
||||
pub(crate) fn new(key: &PrivateKey, _message: &[u8]) -> Self {
|
||||
Signature(key.0)
|
||||
}
|
||||
|
||||
|
||||
@ -16,11 +16,11 @@ pub struct V01State {
|
||||
impl V01State {
|
||||
pub fn new_with_genesis_accounts(initial_data: &[([u8; 32], u128)]) -> Self {
|
||||
let public_state = initial_data
|
||||
.to_owned()
|
||||
.into_iter()
|
||||
.iter()
|
||||
.copied()
|
||||
.map(|(address_value, balance)| {
|
||||
let account = Account {
|
||||
balance: balance,
|
||||
balance,
|
||||
program_owner: AUTHENTICATED_TRANSFER_PROGRAM.id,
|
||||
..Account::default()
|
||||
};
|
||||
@ -58,9 +58,7 @@ impl V01State {
|
||||
}
|
||||
|
||||
fn get_account_by_address_mut(&mut self, address: Address) -> &mut Account {
|
||||
self.public_state
|
||||
.entry(address)
|
||||
.or_default()
|
||||
self.public_state.entry(address).or_default()
|
||||
}
|
||||
|
||||
pub fn get_account_by_address(&self, address: &Address) -> Account {
|
||||
@ -135,12 +133,7 @@ impl V01State {
|
||||
return Err(());
|
||||
}
|
||||
|
||||
Ok(message
|
||||
.addresses
|
||||
.iter()
|
||||
.cloned()
|
||||
.zip(post_states)
|
||||
.collect())
|
||||
Ok(message.addresses.iter().cloned().zip(post_states).collect())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -505,7 +505,7 @@ mod tests {
|
||||
},
|
||||
"witness_set": {
|
||||
"signatures_and_public_keys": [
|
||||
[null, 1]
|
||||
[1, 1]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user