style: apply cargo fmt formatting

This commit is contained in:
Gulshan Yadav 2026-01-08 06:23:23 +05:30
parent 5c643af64c
commit 8bdc9d6086
4 changed files with 14 additions and 22 deletions

View file

@ -528,13 +528,17 @@ impl RpcService {
.await
{
Ok(result) => {
let logs: Vec<serde_json::Value> = result.logs.iter().map(|log| {
serde_json::json!({
"contractId": hex::encode(log.contract_id),
"topics": log.topics.iter().map(hex::encode).collect::<Vec<_>>(),
"data": hex::encode(&log.data)
let logs: Vec<serde_json::Value> = result
.logs
.iter()
.map(|log| {
serde_json::json!({
"contractId": hex::encode(log.contract_id),
"topics": log.topics.iter().map(hex::encode).collect::<Vec<_>>(),
"data": hex::encode(&log.data)
})
})
}).collect();
.collect();
serde_json::json!({
"success": result.success,

View file

@ -570,10 +570,7 @@ impl DAO {
let id = proposal.id;
// Index by proposer
self.by_proposer
.entry(proposer)
.or_default()
.push(id);
self.by_proposer.entry(proposer).or_default().push(id);
self.proposals.insert(id, proposal);
Ok(id)

View file

@ -635,10 +635,7 @@ impl MultisigManager {
// Index by signers
for signer in &config.signers {
self.by_signer
.entry(signer.clone())
.or_default()
.push(id);
self.by_signer.entry(signer.clone()).or_default().push(id);
}
self.wallets.insert(id, wallet);

View file

@ -437,16 +437,10 @@ impl VestingManager {
let id = contract.id;
// Index by beneficiary
self.by_beneficiary
.entry(beneficiary)
.or_default()
.push(id);
self.by_beneficiary.entry(beneficiary).or_default().push(id);
// Index by grantor
self.by_grantor
.entry(grantor)
.or_default()
.push(id);
self.by_grantor.entry(grantor).or_default().push(id);
self.contracts.insert(id, contract);
Ok(id)