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 .await
{ {
Ok(result) => { Ok(result) => {
let logs: Vec<serde_json::Value> = result.logs.iter().map(|log| { let logs: Vec<serde_json::Value> = result
serde_json::json!({ .logs
"contractId": hex::encode(log.contract_id), .iter()
"topics": log.topics.iter().map(hex::encode).collect::<Vec<_>>(), .map(|log| {
"data": hex::encode(&log.data) 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!({ serde_json::json!({
"success": result.success, "success": result.success,

View file

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

View file

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

View file

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