Clean dependencies and imports#123
Merged
ChrisSon15 merged 4 commits intobisq-network:mainfrom Feb 20, 2026
Merged
Conversation
Organise workspace/crate dependencies into a more canonical order, and make sure the versions of any dependencies used by more than one project crate are specified in the workspace manifest. Also run "cargo update" and use the 0.9 version of 'rand' in 'testenv' instead of 0.8. Additionally, remove 'log' & 'rustls' from the dependencies as they are no longer directly used. Finally, substitute the drop-in replacement 'std::sync::LazyLock' for 'once_cell::sync::Lazy' to avoid a direct dependency on 'once_cell' (though it is still used by many upstream crates).
Ensure the import lists of all the Rust source files are canonicalised in accordance with the 'StdExternalCrate' rustfmt config setting, which some files had fallen out of agreement with. Also import traits anonymously using "as _" where possible to minimise namespace pollution (and to make it clear that the trait is not used directly), and remove a few cases of unnecessary import qualification in the code.
1) Replace some 'match' expressions with 'let-else' to shorten; 2) Whitespace (missing/spurious newlines); 3) Inline format strings where possible; 4) Fix typos in identifiers; 5) Fix/move some doc-comments & remove some commented-out code; 6) Add missing '#[ignore]' reason; 7) Use 'assert_(eq|ne)' where possible; 8) Convert from f64 using 'Amount::from_btc' instead of 'from_sat'. (These were mainly flagged by the IDE and temporarily enabled pedantic- level Clippy lints.)
1) Replace impl name with 'Self' where possible; 2) Fix a few typos in identifiers and elsewhere; 3) Break up long numeric literals with '_' and remove a magic number; 4) Whitespace (missing/spurious newlines & spaces); 5) Comment out "env.start_explorer_in_container" to fix protocol tests; 6) Add missing semicolons to single-line statements for consistency; 7) Change block to line comments to avoid IDE autoformatter conflicts; 8) Fix doc-comments in 'wallet::protocol_wallet_api'.
06dbd76 to
6638ddc
Compare
sdmg15
approved these changes
Feb 20, 2026
| rustls = { version = "0.23.35", default-features = false, features = ["ring", "std", "tls12", "logging"] } | ||
| bdk_kyoto = "0.15.4" | ||
| # v2.2.0 deprecates `bdk_wallet::wallet::signer` without making it clear what alternative to use & how: | ||
| bdk_wallet = { version = "~2.1.0", features = ["rusqlite", "keys-bip39"] } |
Contributor
There was a problem hiding this comment.
Maybe we could also narrow this down and add default-features = false?
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.
Organise workspace and individual crate dependencies into a more canonical order, making sure the versions of any dependencies used by more than one project crate are specified in the workspace manifest instead of the individual crate. Also remove any unneeded dependencies from the manifests (such as
rustls&log) and runcargo updateto bring them all to their latest (compatible) versions.Additionally, replace
once_cell::sync::Lazywith the similarstd::sync::LazyLockfor one less (direct) dependency, and canonicalise any source file import lists that had fallen out of kilter with therustfmtconfig settings. Also import traits anonymously where possible.Finally do some minor additional cleanup of the source files, in particular
testenv/src/lib.rs.