Skip to content

Commit

Permalink
chore: fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Feb 20, 2025
1 parent 0851758 commit e41930d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/cli/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ impl<'a> LineFormatter<'a> {
}
TagEnd::Strong => {}
TagEnd::Strikethrough => {}
TagEnd::Link { .. } => {}
TagEnd::Image { .. } => {} // shouldn't happen, handled in start
TagEnd::Link => {}
TagEnd::Image => {} // shouldn't happen, handled in start
TagEnd::FootnoteDefinition => {}
TagEnd::MetadataBlock(_) => {}
TagEnd::Superscript => {}
Expand Down
9 changes: 2 additions & 7 deletions src/cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,13 +1048,8 @@ fn get_and_parse_new_rustup_version(path: &Path) -> Option<String> {
}

fn get_new_rustup_version(path: &Path) -> Option<String> {
match Command::new(path).arg("--version").output() {
Err(_) => None,
Ok(output) => match String::from_utf8(output.stdout) {
Ok(version) => Some(version),
Err(_) => None,
},
}
let output = Command::new(path).arg("--version").output().ok()?;
String::from_utf8(output.stdout).ok()
}

fn parse_new_rustup_version(version: String) -> String {
Expand Down
2 changes: 1 addition & 1 deletion src/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl<'a> Toolchain<'a> {
.cfg
.process
.var_os(sysenv::LOADER_PATH)
.filter(|x| x.len() > 0)
.filter(|x| !x.is_empty())
.is_none()
{
// These are the defaults when DYLD_FALLBACK_LIBRARY_PATH isn't
Expand Down

0 comments on commit e41930d

Please sign in to comment.