mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
use short local var name
This commit is contained in:
parent
4ec82dc945
commit
3fa126ffa5
1 changed files with 5 additions and 5 deletions
|
|
@ -141,19 +141,19 @@ impl TorrentMaps {
|
||||||
path: &std::path::PathBuf,
|
path: &std::path::PathBuf,
|
||||||
info_hashes: &Vec<InfoHash>,
|
info_hashes: &Vec<InfoHash>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let mut file = Context::with_context(std::fs::File::create(path), || {
|
let mut f = Context::with_context(std::fs::File::create(path), || {
|
||||||
format!("File path: {}", path.to_string_lossy())
|
format!("File path: {}", path.to_string_lossy())
|
||||||
})?;
|
})?;
|
||||||
write!(file, "[")?;
|
write!(f, "[")?;
|
||||||
if !info_hashes.is_empty() {
|
if !info_hashes.is_empty() {
|
||||||
write!(file, "\"{}\"", info_hashes[0])?;
|
write!(f, "\"{}\"", info_hashes[0])?;
|
||||||
if let Some(i) = info_hashes.get(1..) {
|
if let Some(i) = info_hashes.get(1..) {
|
||||||
for info_hash in i {
|
for info_hash in i {
|
||||||
write!(file, ",\"{info_hash}\"")?;
|
write!(f, ",\"{info_hash}\"")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write!(file, "]")?;
|
write!(f, "]")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
if config.network.ipv4_active() {
|
if config.network.ipv4_active() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue