Skip to content

Commit

Permalink
chore: Fix formatting issues (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Aug 20, 2022
1 parent 7158974 commit b58f240
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/mapper/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ impl EventWriter {
.iter()
.map(|(reward_account, coin)| WithdrawalRecord {
reward_account: {
let ra_str = reward_account.to_hex();
if ra_str.starts_with("e1") { ra_str[2..].to_string() } else { ra_str }
let hex = reward_account.to_hex();
hex.strip_prefix("e1").map(|x| x.to_string()).unwrap_or(hex)
},
coin: coin.into(),
})
Expand Down
2 changes: 1 addition & 1 deletion src/sinks/terminal/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl LogLine {
"GENESIS",
Color::Magenta,
max_width,
"{{ ... }}".to_string(),
"{{ ... }}".to_string(),
),
EventData::MoveInstantaneousRewardsCert {
from_reserves,
Expand Down
4 changes: 1 addition & 3 deletions src/sources/n2n/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ impl TryFrom<HeaderContent> for MultiEraHeader {
let header = decode(&value.cbor)?;
Ok(MultiEraHeader::Babbage(header))
}
x => {
return Err(format!("This version of Oura can't handle era: {}", x).into());
}
x => Err(format!("This version of Oura can't handle era: {}", x).into()),
}
}
}
Expand Down

0 comments on commit b58f240

Please sign in to comment.