Skip to content

Commit

Permalink
WIP: linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Aug 19, 2021
1 parent e492b09 commit 607a793
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ mod tests {
fn it_fetches_the_version() {
let tag = fetch_image_tag().unwrap();
println!("current tag = {:?}", tag);
assert!(tag.len() > 0);
assert!(!tag.is_empty());
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion lib/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl Runner {

output
.map(|o| o.stdout)
.map(|v| String::from_utf8(v).unwrap_or("".into()))
.map(|v| String::from_utf8(v).unwrap_or_else(|_| "".into()))
.map(|s| serde_json::from_str(&s).unwrap_or(Value::Null))
.map_err(|e| e.to_string())
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/rustc_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub enum RustcVersion {
// Dev(String),
}

pub struct Error;
// pub struct Error;

impl FromStr for RustcVersion {
type Err = String;
Expand Down
1 change: 0 additions & 1 deletion lib/src/version.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::rustc_version::RustcVersion;
use semver::Version;
use serde::{Deserialize, Serialize};
use std::str::FromStr;

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

0 comments on commit 607a793

Please sign in to comment.