diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 93f225d..4d1e9b3 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -32,14 +32,7 @@ jobs: with: toolchain: nightly command: clippy - args: --fix -- -D warnings - - - name: Print fmt version - uses: actions-rs/cargo@v1 - with: - toolchain: nightly - command: fmt - args: --version + args: --all-features -- -D warnings - name: Run cargo fmt uses: actions-rs/cargo@v1 diff --git a/Makefile.toml b/Makefile.toml index f8a4968..0704fc3 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -27,9 +27,11 @@ command = "cargo" args = ["check"] [tasks.clippy-check] +toolchain = "nightly" command = "cargo" args = ["clippy","--all-features","--","-D","warnings"] [tasks.clippy-fix] +toolchain = "nightly" command = "cargo" args = ["clippy","--fix","--allow-staged","--","-D","warnings"] diff --git a/deny.toml b/deny.toml index e6a50f9..bbc9c7e 100644 --- a/deny.toml +++ b/deny.toml @@ -19,7 +19,7 @@ ignore = [ ] [bans] -multiple-versions = "allow" # TODO:update this +multiple-versions = "allow" deny = [] skip = [] diff --git a/src/asset.rs b/src/asset.rs index 98b6408..a3ef072 100644 --- a/src/asset.rs +++ b/src/asset.rs @@ -384,9 +384,9 @@ mod tests { let uusd = Asset::native("uusd", 69u128); let astro = Asset::cw20(Addr::unchecked("astro_token"), 69u128); - assert_eq!(uluna1 == uluna2, false); - assert_eq!(uluna1 == uusd, false); - assert_eq!(astro == astro.clone(), true); + assert!(uluna1 != uluna2); + assert!(uluna1 != uusd); + assert!(astro == astro.clone()); } #[test] diff --git a/src/asset_info.rs b/src/asset_info.rs index eaa42ac..2ca9d51 100644 --- a/src/asset_info.rs +++ b/src/asset_info.rs @@ -265,11 +265,11 @@ mod test { let astro = AssetInfo::cw20(Addr::unchecked("astro_token")); let mars = AssetInfo::cw20(Addr::unchecked("mars_token")); - assert_eq!(uluna == uusd, false); - assert_eq!(uluna == astro, false); - assert_eq!(astro == mars, false); - assert_eq!(uluna == uluna.clone(), true); - assert_eq!(astro == astro.clone(), true); + assert!(uluna != uusd); + assert!(uluna != astro); + assert!(astro != mars); + assert!(uluna == uluna.clone()); + assert!(astro == astro.clone()); } #[test] diff --git a/src/asset_list.rs b/src/asset_list.rs index 8becc8f..6c344d7 100644 --- a/src/asset_list.rs +++ b/src/asset_list.rs @@ -269,11 +269,7 @@ impl AssetList { /// Query balances for all assets in the list for the given address and /// return a new `AssetList` - pub fn query_balances + Clone>( - &self, - querier: &QuerierWrapper, - addr: &Addr, - ) -> StdResult { + pub fn query_balances(&self, querier: &QuerierWrapper, addr: &Addr) -> StdResult { self.into_iter() .map(|asset| { Ok(Asset::new(