fix: resolve remaining clippy warnings
- Prefix unused parameters with underscore in stub function - Replace .map().flatten() with .and_then()
This commit is contained in:
parent
7c7137c4f6
commit
e24ce116d7
2 changed files with 3 additions and 5 deletions
|
|
@ -20,15 +20,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let config_path = args
|
||||
.iter()
|
||||
.position(|a| a == "--config")
|
||||
.map(|i| args.get(i + 1))
|
||||
.flatten()
|
||||
.and_then(|i| args.get(i + 1))
|
||||
.cloned();
|
||||
|
||||
let data_dir = args
|
||||
.iter()
|
||||
.position(|a| a == "--data-dir")
|
||||
.map(|i| args.get(i + 1))
|
||||
.flatten()
|
||||
.and_then(|i| args.get(i + 1))
|
||||
.cloned()
|
||||
.unwrap_or_else(|| "./synor-storage-data".to_string());
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ impl StorageNetwork {
|
|||
|
||||
/// Start the network
|
||||
#[cfg(feature = "node")]
|
||||
pub async fn start(&mut self, listen_addrs: &[String], bootstrap: &[String]) -> Result<()> {
|
||||
pub async fn start(&mut self, _listen_addrs: &[String], _bootstrap: &[String]) -> Result<()> {
|
||||
self.state = NetworkState::Bootstrapping;
|
||||
|
||||
// TODO: Initialize libp2p swarm
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue