Skip to content

Commit

Permalink
Merge pull request #18 from apollodao/dev/no-clippy-fix
Browse files Browse the repository at this point in the history
ci: Make Clippy only check on CI
  • Loading branch information
apollo-sturdy authored Feb 13, 2023
2 parents fb8af4a + d543bb7 commit c79caf5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ignore = [
]

[bans]
multiple-versions = "allow" # TODO:update this
multiple-versions = "allow"
deny = []
skip = []

Expand Down
6 changes: 3 additions & 3 deletions src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions src/asset_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 1 addition & 5 deletions src/asset_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<A: Into<String> + Clone>(
&self,
querier: &QuerierWrapper,
addr: &Addr,
) -> StdResult<AssetList> {
pub fn query_balances(&self, querier: &QuerierWrapper, addr: &Addr) -> StdResult<AssetList> {
self.into_iter()
.map(|asset| {
Ok(Asset::new(
Expand Down

0 comments on commit c79caf5

Please sign in to comment.