Skip to content

Commit 607a793

Browse files
committed
WIP: linting fixes
1 parent e492b09 commit 607a793

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mod tests {
112112
fn it_fetches_the_version() {
113113
let tag = fetch_image_tag().unwrap();
114114
println!("current tag = {:?}", tag);
115-
assert!(tag.len() > 0);
115+
assert!(!tag.is_empty());
116116
}
117117

118118
#[test]

lib/src/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl Runner {
142142

143143
output
144144
.map(|o| o.stdout)
145-
.map(|v| String::from_utf8(v).unwrap_or("".into()))
145+
.map(|v| String::from_utf8(v).unwrap_or_else(|_| "".into()))
146146
.map(|s| serde_json::from_str(&s).unwrap_or(Value::Null))
147147
.map_err(|e| e.to_string())
148148
}

lib/src/rustc_version.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub enum RustcVersion {
1010
// Dev(String),
1111
}
1212

13-
pub struct Error;
13+
// pub struct Error;
1414

1515
impl FromStr for RustcVersion {
1616
type Err = String;

lib/src/version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::rustc_version::RustcVersion;
22
use semver::Version;
33
use serde::{Deserialize, Serialize};
4-
use std::str::FromStr;
54

65
/// A structure describing the output the info command
76
#[derive(Debug, Serialize, Deserialize)]

0 commit comments

Comments
 (0)