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

Update rust-toolchain to nightly of 2023-07-30 #481

Closed
Closed
Show file tree
Hide file tree
Changes from 2 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: 1 addition & 1 deletion apis/adc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<S: Syscalls> Adc<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read_single_sample()?;
while sample.get() == None {
while sample.get().is_none() {
S::yield_wait();
}

Expand Down
4 changes: 2 additions & 2 deletions apis/air_quality/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<S: Syscalls> AirQuality<S> {
match read_type {
CO2 => {
Self::read_co2()?;
while data_cell.get() == None {
while data_cell.get().is_none() {
S::yield_wait();
}

Expand All @@ -91,7 +91,7 @@ impl<S: Syscalls> AirQuality<S> {
}
Tvoc => {
Self::read_tvoc()?;
while data_cell.get() == None {
while data_cell.get().is_none() {
S::yield_wait();
}

Expand Down
2 changes: 1 addition & 1 deletion apis/ambient_light/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl<S: Syscalls> AmbientLight<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read_intensity()?;
while intensity_cell.get() == None {
while intensity_cell.get().is_none() {
S::yield_wait();
}

Expand Down
2 changes: 1 addition & 1 deletion apis/buzzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<S: Syscalls> Buzzer<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::tone(freq, duration)?;
while buzzer_cell.get() == None {
while buzzer_cell.get().is_none() {
S::yield_wait();
}
match buzzer_cell.get() {
Expand Down
6 changes: 3 additions & 3 deletions apis/ninedof/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<S: Syscalls> NineDof<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read_accelerometer()?;
while data_cell.get() == None {
while data_cell.get().is_none() {
S::yield_wait();
}
match data_cell.get() {
Expand All @@ -84,7 +84,7 @@ impl<S: Syscalls> NineDof<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read_magnetometer()?;
while data_cell.get() == None {
while data_cell.get().is_none() {
S::yield_wait();
}
match data_cell.get() {
Expand All @@ -105,7 +105,7 @@ impl<S: Syscalls> NineDof<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read_gyro()?;
while data_cell.get() == None {
while data_cell.get().is_none() {
S::yield_wait();
}
match data_cell.get() {
Expand Down
2 changes: 1 addition & 1 deletion apis/proximity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<S: Syscalls> Proximity<S> {
share::scope(|subscribe| {
if let Ok(()) = Self::register_listener(&listener, subscribe) {
if let Ok(()) = Self::read_on_interrupt(lower, upper) {
while listener.get() == None {
while listener.get().is_none() {
S::yield_wait();
}
}
Expand Down
2 changes: 1 addition & 1 deletion apis/sound_pressure/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<S: Syscalls> SoundPressure<S> {
share::scope(|subscribe| {
Self::register_listener(&listener, subscribe)?;
Self::read()?;
while pressure_cell.get() == None {
while pressure_cell.get().is_none() {
S::yield_wait();
}
match pressure_cell.get() {
Expand Down
2 changes: 1 addition & 1 deletion apis/temperature/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<S: Syscalls> Temperature<S> {
share::scope(|subscribe| {
if let Ok(()) = Self::register_listener(&listener, subscribe) {
if let Ok(()) = Self::read_temperature() {
while temperature_cell.get() == None {
while temperature_cell.get().is_none() {
S::yield_wait();
}
}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[toolchain]
# See https://rust-lang.github.io/rustup-components-history/ for a list of
# recently nightlies and what components are available for them.
channel = "nightly-2022-06-10"
channel = "nightly-2023-07-30"
components = ["clippy", "miri", "rustfmt"]
targets = ["thumbv7em-none-eabi",
"riscv32imac-unknown-none-elf",
Expand Down
2 changes: 1 addition & 1 deletion unittest/src/fake/air_quality/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl AirQuality {
pub fn set_value(&self, value: u32) {
if self.busy.get() {
self.share_ref
.schedule_upcall(0, (value as u32, 0, 0))
.schedule_upcall(0, (value, 0, 0))
.expect("Unable to schedule upcall");
self.busy.set(false);
}
Expand Down
2 changes: 1 addition & 1 deletion unittest/src/fake/ambient_light/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl AmbientLight {
pub fn set_value(&self, value: u32) {
if self.busy.get() {
self.share_ref
.schedule_upcall(0, (value as u32, 0, 0))
.schedule_upcall(0, (value, 0, 0))
.expect("Unable to schedule upcall");
self.busy.set(false);
}
Expand Down
4 changes: 2 additions & 2 deletions unittest/src/fake/gpio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ impl<const NUM_GPIOS: usize> Gpio<NUM_GPIOS> {
}

pub fn set_missing_gpio(&self, gpio: usize) {
if (gpio as usize) < self.gpios.len() {
self.gpios[gpio as usize].set(None);
if gpio < self.gpios.len() {
self.gpios[gpio].set(None);
}
}

Expand Down
2 changes: 1 addition & 1 deletion unittest/src/fake/sound_pressure/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl crate::fake::SyscallDriver for SoundPressure {
}
self.busy.set(true);
if let Some(val) = self.upcall_on_command.take() {
self.set_value(val as u8);
self.set_value(val);
}
crate::command_return::success()
}
Expand Down
Loading