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

Fix some warnings with recent versions of rust #61

Merged
merged 1 commit into from
Sep 15, 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
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
Loading