fix: resolve remaining clippy warnings

- Prefix unused parameters with underscore in stub function
- Replace .map().flatten() with .and_then()
This commit is contained in:
Gulshan Yadav 2026-02-02 07:09:15 +05:30
parent 7c7137c4f6
commit e24ce116d7
2 changed files with 3 additions and 5 deletions

View file

@ -20,15 +20,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config_path = args let config_path = args
.iter() .iter()
.position(|a| a == "--config") .position(|a| a == "--config")
.map(|i| args.get(i + 1)) .and_then(|i| args.get(i + 1))
.flatten()
.cloned(); .cloned();
let data_dir = args let data_dir = args
.iter() .iter()
.position(|a| a == "--data-dir") .position(|a| a == "--data-dir")
.map(|i| args.get(i + 1)) .and_then(|i| args.get(i + 1))
.flatten()
.cloned() .cloned()
.unwrap_or_else(|| "./synor-storage-data".to_string()); .unwrap_or_else(|| "./synor-storage-data".to_string());

View file

@ -107,7 +107,7 @@ impl StorageNetwork {
/// Start the network /// Start the network
#[cfg(feature = "node")] #[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; self.state = NetworkState::Bootstrapping;
// TODO: Initialize libp2p swarm // TODO: Initialize libp2p swarm