From 179e178e9664044aebb1667951e331ad781d2f2f Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 18 Sep 2025 21:31:54 +0800 Subject: [PATCH] fix up formatting that changed due to the flag day --- libs/bao1x-hal/src/ifram.rs | 3 +-- services/bao-console/src/cmds.rs | 4 ++-- services/bao-console/src/cmds/i2cdetect.rs | 2 +- services/bao-console/src/cmds/test.rs | 4 ++-- services/bao-video/src/panic.rs | 4 ++-- services/cram-console/src/main.rs | 2 +- services/modals/src/lib.rs | 4 ++-- services/modals/src/main.rs | 4 ++-- services/pddb/src/backend/trngpool.rs | 4 ++-- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/libs/bao1x-hal/src/ifram.rs b/libs/bao1x-hal/src/ifram.rs index 0fc41d2f9..2b9caa9c3 100644 --- a/libs/bao1x-hal/src/ifram.rs +++ b/libs/bao1x-hal/src/ifram.rs @@ -47,8 +47,7 @@ impl IframRange { // This constant is in fact hard-coded because we are trying to break a circular // dependency on the bao1x-hal-service crate and make this library "neutral" so it // can be included in any context. - let conn = - xns.request_connection("_bao1x-SoC HAL_").expect("Couldn't connect to bao1x HAL server"); + let conn = xns.request_connection("_bao1x-SoC HAL_").expect("Couldn't connect to bao1x HAL server"); let bank_code = match bank { Some(IframBank::Bank0) => 0, Some(IframBank::Bank1) => 1, diff --git a/services/bao-console/src/cmds.rs b/services/bao-console/src/cmds.rs index fd7b75767..6539272b8 100644 --- a/services/bao-console/src/cmds.rs +++ b/services/bao-console/src/cmds.rs @@ -2,10 +2,10 @@ use core::fmt::Write; use std::collections::HashMap; use String; -#[cfg(feature = "bao1x")] -use bao1x_hal_service::trng; #[cfg(feature = "hosted-baosec")] use bao1x_emu::trng; +#[cfg(feature = "bao1x")] +use bao1x_hal_service::trng; use xous::MessageEnvelope; /////////////////////////// Common items to all commands diff --git a/services/bao-console/src/cmds/i2cdetect.rs b/services/bao-console/src/cmds/i2cdetect.rs index 9d1ef030a..9aa68b69d 100644 --- a/services/bao-console/src/cmds/i2cdetect.rs +++ b/services/bao-console/src/cmds/i2cdetect.rs @@ -1,7 +1,7 @@ use String; -use bao1x_hal_service::I2c; use bao1x_api::I2cApi; use bao1x_api::I2cResult; +use bao1x_hal_service::I2c; use crate::{CommonEnv, ShellCmdApi}; diff --git a/services/bao-console/src/cmds/test.rs b/services/bao-console/src/cmds/test.rs index 9f0acbbe5..836ffd3bf 100644 --- a/services/bao-console/src/cmds/test.rs +++ b/services/bao-console/src/cmds/test.rs @@ -39,8 +39,8 @@ impl<'a> ShellCmdApi<'a> for Test { } #[cfg(feature = "bmp180")] "temp" => { - use bao1x_hal_service::I2c; use bao1x_hal::bmp180::Bmp180; + use bao1x_hal_service::I2c; let mut i2c = I2c::new(); match Bmp180::new(&mut i2c) { @@ -58,8 +58,8 @@ impl<'a> ShellCmdApi<'a> for Test { } } "shutdown" => { - use bao1x_hal_service::I2c; use bao1x_api::*; + use bao1x_hal_service::I2c; let iox = bao1x_api::IoxHal::new(); let mut i2c = I2c::new(); iox.setup_pin( diff --git a/services/bao-video/src/panic.rs b/services/bao-video/src/panic.rs index 8ddc9eedd..01e711e2d 100644 --- a/services/bao-video/src/panic.rs +++ b/services/bao-video/src/panic.rs @@ -2,12 +2,12 @@ use core::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::thread; -use blitstr2::ClipRect; -use blitstr2::NULL_GLYPH_SPRITE; use bao1x_api::{EventChannel, IoxHal}; use bao1x_hal::ifram::IframRange; use bao1x_hal::sh1107::{Mono, Oled128x128}; use bao1x_hal::udma; +use blitstr2::ClipRect; +use blitstr2::NULL_GLYPH_SPRITE; /// THIS NEEDS SUBSTANTIAL REWORK, THE DRIVER HERE TARGETS A DIFFERENT DISPLAY THAN THE SH1107. /// We can have no allocations inside this, and ideally, it's as minimal as possible. diff --git a/services/cram-console/src/main.rs b/services/cram-console/src/main.rs index 2da87be0a..7117de336 100644 --- a/services/cram-console/src/main.rs +++ b/services/cram-console/src/main.rs @@ -17,8 +17,8 @@ use std::sync::{ }; use std::thread; -use cmds::*; use bao1x_hal_service::keyboard; +use cmds::*; use graphics_server::Gid; use locales::t; use num_traits::*; diff --git a/services/modals/src/lib.rs b/services/modals/src/lib.rs index 98fd3abcb..22d5f2ef6 100644 --- a/services/modals/src/lib.rs +++ b/services/modals/src/lib.rs @@ -11,10 +11,10 @@ use std::cmp::max; #[cfg(feature = "ditherpunk")] use std::convert::TryInto; -#[cfg(feature = "bao1x")] -use bao1x_hal_service::trng::Trng; #[cfg(feature = "hosted-baosec")] use bao1x_emu::trng::Trng; +#[cfg(feature = "bao1x")] +use bao1x_hal_service::trng::Trng; use bit_field::BitField; #[cfg(not(any(feature = "hosted-baosec", feature = "board-baosec")))] use gam::*; diff --git a/services/modals/src/main.rs b/services/modals/src/main.rs index a412445f2..6e4b196e8 100644 --- a/services/modals/src/main.rs +++ b/services/modals/src/main.rs @@ -29,10 +29,10 @@ /// a `TextResponseValid` message which pumps the work queue. mod api; use api::*; -#[cfg(feature = "bao1x")] -use bao1x_hal_service::trng::Trng; #[cfg(feature = "hosted-baosec")] use bao1x_emu::trng::Trng; +#[cfg(feature = "bao1x")] +use bao1x_hal_service::trng::Trng; use blitstr2::GlyphStyle; #[cfg(feature = "ditherpunk")] use gam::Bitmap; diff --git a/services/pddb/src/backend/trngpool.rs b/services/pddb/src/backend/trngpool.rs index 0eab8f853..061883ad3 100644 --- a/services/pddb/src/backend/trngpool.rs +++ b/services/pddb/src/backend/trngpool.rs @@ -3,10 +3,10 @@ use core::mem::size_of; use std::convert::TryInto; use aes_gcm_siv::Nonce; -#[cfg(all(feature = "bao1x-hal", not(feature = "hosted-baosec")))] -use bao1x_hal_service::trng::Trng; #[cfg(feature = "hosted-baosec")] use bao1x_emu::trng::Trng; +#[cfg(all(feature = "bao1x-hal", not(feature = "hosted-baosec")))] +use bao1x_hal_service::trng::Trng; use rand_core::RngCore; #[cfg(all(not(feature = "bao1x-hal"), not(feature = "hosted-baosec")))] use trng::Trng;