Skip to content

Commit a0efc08

Browse files
committed
chore: fix new clippy warnings
1 parent 0851758 commit a0efc08

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/cli/markdown.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ impl<'a> LineFormatter<'a> {
195195
}
196196
TagEnd::Strong => {}
197197
TagEnd::Strikethrough => {}
198-
TagEnd::Link { .. } => {}
199-
TagEnd::Image { .. } => {} // shouldn't happen, handled in start
198+
TagEnd::Link => {}
199+
TagEnd::Image => {} // shouldn't happen, handled in start
200200
TagEnd::FootnoteDefinition => {}
201201
TagEnd::MetadataBlock(_) => {}
202202
TagEnd::Superscript => {}

src/cli/self_update.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -1048,13 +1048,8 @@ fn get_and_parse_new_rustup_version(path: &Path) -> Option<String> {
10481048
}
10491049

10501050
fn get_new_rustup_version(path: &Path) -> Option<String> {
1051-
match Command::new(path).arg("--version").output() {
1052-
Err(_) => None,
1053-
Ok(output) => match String::from_utf8(output.stdout) {
1054-
Ok(version) => Some(version),
1055-
Err(_) => None,
1056-
},
1057-
}
1051+
let output = Command::new(path).arg("--version").output().ok()?;
1052+
String::from_utf8(output.stdout).ok()
10581053
}
10591054

10601055
fn parse_new_rustup_version(version: String) -> String {

src/toolchain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<'a> Toolchain<'a> {
204204
.cfg
205205
.process
206206
.var_os(sysenv::LOADER_PATH)
207-
.filter(|x| x.len() > 0)
207+
.filter(|x| !x.is_empty())
208208
.is_none()
209209
{
210210
// These are the defaults when DYLD_FALLBACK_LIBRARY_PATH isn't

0 commit comments

Comments
 (0)