diff --git a/CHANGELOG.md b/CHANGELOG.md index 226adb0..0a3420a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +0.6.2 +===== +Features: +* Allow setting the path to the kubectl binary that click uses via `set kubectl_binary ` +* Print the full path the kubectl binary in `env` + +Bug Fixes: +* Don't panic if an "azure-auth-provider" doesn't include `expires-by` + 0.6.1 ===== Bugfix release: diff --git a/Cargo.lock b/Cargo.lock index 0d1d31c..9943871 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "click" -version = "0.6.1" +version = "0.6.2" dependencies = [ "atomicwrites", "base64", diff --git a/Cargo.toml b/Cargo.toml index 636dac2..effb7c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "click" -version = "0.6.1" +version = "0.6.2" description = "A command-line REPL for Kubernetes that integrates into existing cli workflows" authors = ["Nick Lanham "] homepage = "https://github.com/databricks/click/wiki" diff --git a/src/completer.rs b/src/completer.rs index 4d864ba..000e6ee 100644 --- a/src/completer.rs +++ b/src/completer.rs @@ -83,12 +83,7 @@ impl ClickHelper { #[allow(clippy::borrowed_box)] fn get_exact_command(&self, line: &str) -> Option<&Box> { - for cmd in self.commands.iter() { - if cmd.is(line) { - return Some(cmd); - } - } - None + self.commands.iter().find(|&cmd| cmd.is(line)) } /// complete a line that starts with a full command. This should only be called when we know diff --git a/src/table.rs b/src/table.rs index cd168b0..8146ba8 100644 --- a/src/table.rs +++ b/src/table.rs @@ -379,7 +379,7 @@ pub fn raw_quantity(quantity: &Quantity) -> f64 { if suffix.len() > 1 && (suffix.starts_with('e') || suffix.starts_with('E')) { // our suffix has more than one char and starts with e/E, so it should be a decimal exponent - match (&suffix[1..]).parse::() { + match (suffix[1..]).parse::() { Ok(exp) => { let famt = (amt * base10.pow(exp)) as f64; if has_neg {