Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow build warnings for Rust #4703

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[future-incompat-report]
frequency = "never"
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Run Unit Tests
shell: bash
run: |
cargo test --lib --bins --benches --examples --all-features
RUSTFLAGS="-D warnings" cargo test --lib --bins --benches --examples --all-features
env:
RUST_BACKTRACE: 1
- name: Lint rustdoc
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG-Nns-Dapp-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ proposal is successful, the changes it released will be moved from this file to

#### Changed

* Disallow build warnings for Rust.

#### Deprecated

#### Removed
Expand Down
1 change: 0 additions & 1 deletion rs/backend/src/accounts_store/schema/proxy/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use candid::types::number;
use ic_stable_structures::memory_manager;
use pretty_assertions::assert_eq;
use proptest::proptest;
Expand Down
9 changes: 0 additions & 9 deletions rs/backend/src/state/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ pub enum PartitionsMaybe {
}

impl PartitionsMaybe {
/// Gets the schema label.
#[cfg(test)]
pub fn schema_label(&self) -> SchemaLabel {
match self {
#[cfg(test)]
PartitionsMaybe::Partitions(partitions) => partitions.schema_label(),
PartitionsMaybe::None(_) => SchemaLabel::Map,
}
}
/// Gets or creates partitions.
///
/// WARNING: Partitioning overwrites the memory. Please be sure that you have extracted all useful data from raw memory before calling this.
Expand Down