cli: Fix some clippy lints
This commit is contained in:
parent
61865b5b5a
commit
7ed72ec918
|
|
@ -231,8 +231,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
} => {
|
||||
let repo = storage.repository(repo)?;
|
||||
|
||||
match show(revs, &repo, type_name, &profile) {
|
||||
Err(e) => {
|
||||
if let Err(e) = show(revs, &repo, type_name, &profile) {
|
||||
if let Some(err) = e.downcast_ref::<io::Error>() {
|
||||
if err.kind() == io::ErrorKind::BrokenPipe {
|
||||
return Ok(());
|
||||
|
|
@ -240,8 +239,6 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
}
|
||||
return Err(e);
|
||||
}
|
||||
Ok(()) => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +254,7 @@ fn show(
|
|||
let mut stdout = std::io::stdout();
|
||||
|
||||
if type_name == cob::patch::TYPENAME.clone() {
|
||||
let patches = term::cob::patches(&profile, repo)?;
|
||||
let patches = term::cob::patches(profile, repo)?;
|
||||
for oid in revs {
|
||||
let oid = &oid.resolve(&repo.backend)?;
|
||||
let Some(patch) = patches.get(oid)? else {
|
||||
|
|
@ -267,7 +264,7 @@ fn show(
|
|||
stdout.write_all(b"\n")?;
|
||||
}
|
||||
} else if type_name == cob::issue::TYPENAME.clone() {
|
||||
let issues = term::cob::issues(&profile, repo)?;
|
||||
let issues = term::cob::issues(profile, repo)?;
|
||||
for oid in revs {
|
||||
let oid = &oid.resolve(&repo.backend)?;
|
||||
let Some(issue) = issues.get(oid)? else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue