Skip to content

Commit

Permalink
Formatting ... I'm learning :)
Browse files Browse the repository at this point in the history
  • Loading branch information
veryordinally committed Sep 10, 2022
1 parent 39cc400 commit 5987958
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/subcommand/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::*;

#[derive(Debug, Parser)]
pub(crate) struct List {
#[clap(long,short,help = "Use extended output format")]
#[clap(long, short, help = "Use extended output format")]
longform: bool,
outpoints: Vec<OutPoint>,
}
Expand All @@ -19,12 +19,17 @@ impl List {
println!("{} {}", outpoint, oldest.0);
}
for (start, end) in ranges {
if self.longform { println!(" [{start},{end})<{}>", end-start) }
else { println!("[{start},{end})") }
if self.longform {
println!(" [{start},{end})<{}>", end - start)
} else {
println!("[{start},{end})")
}
}
}
Some(crate::index::List::Spent(txid)) => return Err(anyhow!("Output {} spent in transaction {txid}", outpoint)),
None => return Err(anyhow!("Output {} not found", outpoint))
Some(crate::index::List::Spent(txid)) => {
return Err(anyhow!("Output {} spent in transaction {txid}", outpoint))
}
None => return Err(anyhow!("Output {} not found", outpoint)),
}
}
Ok(())
Expand Down

0 comments on commit 5987958

Please sign in to comment.