Skip to content

Commit

Permalink
Merge pull request #61 from jannic/fix-warnings
Browse files Browse the repository at this point in the history
Fix some warnings with recent versions of rust
  • Loading branch information
jannic authored Sep 15, 2024
2 parents 5b06ca5 + 9efbab3 commit 9c9317d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.7", default_features = false }
num_enum = { version = "0.7", default-features = false }

[dev-dependencies]
test-generator = "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion pio-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion pio-proc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ impl<const PROGRAM_SIZE: usize> Assembler<PROGRAM_SIZE> {
/// Create a new unbound Label.
pub fn label(&mut self) -> Label {
Label {
state: LabelState::Unbound(core::u8::MAX),
state: LabelState::Unbound(u8::MAX),
}
}

Expand All @@ -616,7 +616,7 @@ impl<const PROGRAM_SIZE: usize> Assembler<PROGRAM_SIZE> {
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 {
Expand Down

0 comments on commit 9c9317d

Please sign in to comment.