From 95e57cf084e7e76571608f1eebca7de3006b57b8 Mon Sep 17 00:00:00 2001 From: Denis Isidoro Date: Sat, 30 Oct 2021 18:07:05 -0300 Subject: [PATCH] Update to rust 1.56.0 and 2021 edition (#637) --- Cargo.toml | 2 +- rust-toolchain.toml | 3 +++ src/config/cli.rs | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/Cargo.toml b/Cargo.toml index a67508c..928f79a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "navi" version = "2.18.0" authors = ["Denis Isidoro "] -edition = "2018" +edition = "2021" description = "An interactive cheatsheet tool for the command-line" homepage = "https://github.com/denisidoro/navi" documentation = "https://github.com/denisidoro/navi" diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..bb6a5c9 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.56.0" +components = [ "rustfmt", "clippy" ] \ No newline at end of file diff --git a/src/config/cli.rs b/src/config/cli.rs index 6b07e43..c92aac8 100644 --- a/src/config/cli.rs +++ b/src/config/cli.rs @@ -217,28 +217,28 @@ mod tests { #[test] fn test_widget_possible_values() { for v in WIDGET_POSSIBLE_VALUES { - assert_eq!(true, Shell::from_str(v).is_ok()) + assert!(Shell::from_str(v).is_ok()) } } #[test] fn test_info_possible_values() { for v in INFO_POSSIBLE_VALUES { - assert_eq!(true, Info::from_str(v).is_ok()) + assert!(Info::from_str(v).is_ok()) } } #[test] fn test_func_possible_values() { for v in FUNC_POSSIBLE_VALUES { - assert_eq!(true, Func::from_str(v).is_ok()) + assert!(Func::from_str(v).is_ok()) } } #[test] fn test_finder_possible_values() { for v in FINDER_POSSIBLE_VALUES { - assert_eq!(true, FinderChoice::from_str(v).is_ok()) + assert!(FinderChoice::from_str(v).is_ok()) } } }