Refactoring of fido code#44
Merged
lockedmutex merged 7 commits intomainfrom Jan 25, 2026
Merged
Conversation
…he backend write_config command instead of a hardcoded string.
Member
Author
|
There are still a few cargo clippy warnings I would like to be fixed before this is merged $ cargo clippy
Checking picoforge v0.3.0 (/home/douzeb/gits/librekeys/picoforge/src-tauri)
warning: this import is redundant
--> src/rescue/mod.rs:9:1
|
9 | use log;
| ^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#single_component_path_imports
= note: `#[warn(clippy::single_component_path_imports)]` on by default
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> src/fido/constants.rs:157:16
|
157 | pub fn to_u64(&self) -> u64 {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
warning: redundant closure
--> src/fido/mod.rs:397:37
|
397 | let device = get_device().map_err(|e| PFError::Device(e))?;
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PFError::Device`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
warning: this `if` statement can be collapsed
--> src/rescue/mod.rs:325:2
|
325 | / if let Some(name) = config.product_name {
326 | | if !name.is_empty() {
327 | | let name_bytes = name.as_bytes();
328 | | let len = name_bytes.len() + 1;
... |
338 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
325 ~ if let Some(name) = config.product_name
326 ~ && !name.is_empty() {
327 | let name_bytes = name.as_bytes();
...
336 | tlv.push(0x00); // Null terminator
337 ~ }
|
warning: name `FIDO` contains a capitalized acronym
--> src/types.rs:63:2
|
63 | FIDO,
| ^^^^ help: consider making the acronym lowercase, except the initial letter: `Fido`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#upper_case_acronyms
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
warning: `picoforge` (lib) generated 5 warnings (run `cargo clippy --fix --lib -p picoforge` to apply 3 suggestions) |
lockedmutex
approved these changes
Jan 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.