fmt: Run cargo fmt

This commit is contained in:
Maxim Muravev
2026-07-19 18:52:39 +03:00
parent a8ab4b7c09
commit 6cc2a64645
3 changed files with 17 additions and 3 deletions
+2
View File
@@ -8,10 +8,12 @@
- [jetcookies](https://github.com/jetcookies): Contributed `package.nix` file for nix packaging of the application and maintains the nix flake of the application.
- [Sylvain Pelissier](https://github.com/sylvainpelissier): Worked on the Enterprise attestation features.
- [kralonur](https://github.com/kralonur): Improved Pico-FIDO 7.6 compatibility and preserved legacy FIDO hardware configuration support.
- [TheMaxMur](https://github.com/TheMaxMur): Add RS-Key support.
**Third-party Libraries**
- [Pico FIDO](https://github.com/polhenarejos/pico-fido) - The firmware this tool configures
- [RS-Key](https://github.com/TheMaxMur/RS-Key) - The second firmware this tool configures
- [GPUI](https://www.gpui.rs/) - UI framework written in rust
- [gpui-component](https://longbridge.github.io/gpui-component/) - UI components for GPUI framework
- [pcsc-rust](https://github.com/bluetech/pcsc-rust) - Smart card interface
+7 -2
View File
@@ -1031,7 +1031,9 @@ fn build_rskey_phy_tlv(config: &AppConfigInput) -> Result<Vec<u8>, PFError> {
// Firmware accepts a product record of 1..=33 bytes (name + trailing NUL),
// so the name must be <= 32 bytes — reject rather than emit a wrapped length.
if bytes.len() + 1 > 33 {
return Err(PFError::Device("Product name too long (max 32 bytes).".into()));
return Err(PFError::Device(
"Product name too long (max 32 bytes).".into(),
));
}
tlv.push(RSKEY_PHY_TAG_USB_PRODUCT);
tlv.push((bytes.len() + 1) as u8);
@@ -1467,7 +1469,10 @@ pub(crate) fn read_rskey_led_config(transport: &HidTransport) -> Result<LedStatu
// `EF_LED_CONF` block. `parse_led_block` handles the 17/13/9-byte layouts.
let data = transport.rs_key_config_read(RSKEY_CFG_TARGET_LED)?;
let (steady, statuses) = crate::hal::common::parse_led_block(&data).ok_or_else(|| {
PFError::Device(format!("LED config response too short: {} bytes", data.len()))
PFError::Device(format!(
"LED config response too short: {} bytes",
data.len()
))
})?;
log::info!(
+8 -1
View File
@@ -761,7 +761,14 @@ impl ConfigViewModel {
let new_curves_mask = Self::curves_mask_from_toggles(self);
let changed = Some(new_curves_mask) != raw_curves_mask
|| (raw_curves_mask.is_none() && new_curves_mask != 0);
(changed, if changed { Some(new_curves_mask) } else { raw_curves_mask })
(
changed,
if changed {
Some(new_curves_mask)
} else {
raw_curves_mask
},
)
};
if has_curve_changes {
has_changes = true;