From 7c2a1e9271fdc9a00bb5d6e38800b67d16162670 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Tue, 28 May 2024 10:09:23 +0000 Subject: [PATCH] Fix some warnings in rust beta --- Cargo.toml | 4 ++-- pio-parser/Cargo.toml | 2 +- pio-proc/Cargo.toml | 2 +- src/lib.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9b8b57d..b1b6bd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,9 @@ repository = "https://github.com/rp-rs/pio-rs" members = ["pio-proc", "pio-parser"] [dependencies] -arrayvec = { version = "0.7", default_features = false } +arrayvec = { version = "0.7", default-features = false } paste = "1.0" -num_enum = { version = "0.5", default_features = false } +num_enum = { version = "0.5", default-features = false } [dev-dependencies] test-generator = "0.3.0" diff --git a/pio-parser/Cargo.toml b/pio-parser/Cargo.toml index ca6cd4f..4b81291 100644 --- a/pio-parser/Cargo.toml +++ b/pio-parser/Cargo.toml @@ -16,4 +16,4 @@ pio = { path = "..", version = "0.2.1" } lalrpop = "0.19.6" # This is only here to work around https://github.com/lalrpop/lalrpop/issues/750 # It should be removed once that workaround is no longer needed. -regex-syntax = { version = "0.6", default_features = false, features = ["unicode"] } +regex-syntax = { version = "0.6", default-features = false, features = ["unicode"] } diff --git a/pio-proc/Cargo.toml b/pio-proc/Cargo.toml index ed79663..1cad892 100644 --- a/pio-proc/Cargo.toml +++ b/pio-proc/Cargo.toml @@ -22,4 +22,4 @@ pio-parser = { path = "../pio-parser", version = "0.2.0" } lalrpop-util = "0.19.6" # This is only here to work around https://github.com/lalrpop/lalrpop/issues/750 # It should be removed once that workaround is no longer needed. -regex-syntax = { version = "0.6", default_features = false, features = ["unicode"] } +regex-syntax = { version = "0.6", default-features = false, features = ["unicode"] } diff --git a/src/lib.rs b/src/lib.rs index e5de4c7..d2f5c4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -589,7 +589,7 @@ impl Assembler { /// Create a new unbound Label. pub fn label(&mut self) -> Label { Label { - state: LabelState::Unbound(core::u8::MAX), + state: LabelState::Unbound(u8::MAX), } } @@ -606,7 +606,7 @@ impl Assembler { LabelState::Bound(_) => panic!("cannot bind label twice"), LabelState::Unbound(mut patch) => { let resolved_address = self.instructions.len() as u8; - while patch != core::u8::MAX { + while patch != u8::MAX { // SAFETY: patch points to the next instruction to patch let instr = unsafe { self.instructions.get_unchecked_mut(patch as usize) }; if let InstructionOperands::JMP { address, .. } = &mut instr.operands {