Skip to content

Commit 4033532

Browse files
committed
solana: deny truncation in Cargo.toml instead of GitHub yml
1 parent 349dc3e commit 4033532

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

.github/workflows/solana.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
run: cargo check --workspace --tests --manifest-path solana/Cargo.toml
7171

7272
- name: Run `cargo clippy`
73-
run: cargo clippy --workspace --tests --manifest-path solana/Cargo.toml -- -Dclippy::cast_possible_truncation
73+
run: cargo clippy --workspace --tests --manifest-path solana/Cargo.toml
7474

7575
- name: Cache solana tools
7676
id: cache-solana

solana/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resolver = "2"
99
[workspace.lints.clippy]
1010
# The following rules should be enabled but conflict with other open PRs.
1111
# TODO enable the commented rules below
12-
# cast_possible_truncation = "deny"
12+
cast_possible_truncation = "deny"
1313
# cast_lossless= "deny"
1414
# as_conversions = "deny"
1515
# arithmetic_side_effects = "deny"

solana/programs/example-native-token-transfers/src/bitmap.rs

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ impl Bitmap {
4141
Ok(BM::<128>::from_value(self.map).get(usize::from(index)))
4242
}
4343

44-
#[allow(clippy::cast_possible_truncation)]
4544
pub fn count_enabled_votes(&self, enabled: Bitmap) -> u8 {
4645
let bm = BM::<128>::from_value(self.map) & BM::<128>::from_value(enabled.map);
4746
bm.len()

0 commit comments

Comments
 (0)