Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Sep 5, 2022
1 parent 069fe28 commit a3279bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions boards/rp-pico-w/examples/pico_w_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ async fn run(spawner: Spawner, pins: rp_pico_w::Pins, state: &'static cyw43::Sta
if option_env!("WIFI_NETWORK").is_some() {
if option_env!("WIFI_PASSWORD").is_some() {
control
.join_wpa2(option_env!("WIFI_NETWORK").unwrap(), option_env!("WIFI_PASSWORD").unwrap())
.join_wpa2(
option_env!("WIFI_NETWORK").unwrap(),
option_env!("WIFI_PASSWORD").unwrap(),
)
.await;
} else {
control.join_open(option_env!("WIFI_NETWORK").unwrap()).await;
control
.join_open(option_env!("WIFI_NETWORK").unwrap())
.await;
}
} else {
warn!("Environment variable WIFI_NETWORK not set during compilation - not joining wireless network");
Expand Down
4 changes: 3 additions & 1 deletion rp2040-hal/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ macro_rules! impl_alarm {

// If it is not set, it has already triggered.
let now = get_counter(timer);
if now.const_cmp(timestamp) == Ordering::Greater && (timer.armed.read().bits() & $armed_bit_mask) != 0 {
if now.const_cmp(timestamp) == Ordering::Greater
&& (timer.armed.read().bits() & $armed_bit_mask) != 0
{
// timestamp was set in the past

// safety: TIMER.armed is a write-clear register, and there can only be
Expand Down

0 comments on commit a3279bd

Please sign in to comment.