Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Fix some clippy lints
cloudhead committed 1 year ago
commit 7ed72ec918482aab0e0409abdee0d1b0025469fd
parent 61865b5b5ad715e2b812087947281f0add9aa05e
1 file changed +7 -10
modified radicle-cli/src/commands/cob.rs
@@ -231,16 +231,13 @@ 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 Some(err) = e.downcast_ref::<io::Error>() {
-
                        if err.kind() == io::ErrorKind::BrokenPipe {
-
                            return Ok(());
-
                        }
+
            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(());
                    }
-
                    return Err(e);
                }
-
                Ok(()) => {}
+
                return Err(e);
            }
        }
    }
@@ -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 {