Skip to content

Commit

Permalink
fix: clippy issues with config (#5334)
Browse files Browse the repository at this point in the history
Description
---
Apply the mut to the config only when unix and libtor flag is used.
Otherwise that piece of code (the one where mut is actually needed) is
never used and then clippy complains that `mut` is not necessary.


<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
Cifko committed Apr 18, 2023
1 parent cf4b2c8 commit 026f0d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions applications/tari_base_node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ fn main_inner() -> Result<(), ExitError> {
consts::APP_VERSION
);

#[cfg(all(unix, feature = "libtor"))]
let mut config = ApplicationConfig::load_from(&cfg)?;
#[cfg(not(all(unix, feature = "libtor")))]
let config = ApplicationConfig::load_from(&cfg)?;
debug!(target: LOG_TARGET, "Using base node configuration: {:?}", config);

// Load or create the Node identity
Expand Down

0 comments on commit 026f0d5

Please sign in to comment.