Skip to content

Commit

Permalink
Fix a bug in id32 printing code
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Oct 9, 2024
1 parent 61a01b4 commit fecc3f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/librqbit_core/src/magnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ impl Magnet {
id20,
id32,
trackers,
select_only: if files.is_empty() {
None
} else {
Some(files)
},
select_only: if files.is_empty() { None } else { Some(files) },
}),
false => {
anyhow::bail!("did not find infohash")
Expand Down Expand Up @@ -124,7 +120,7 @@ impl std::fmt::Display for Magnet {
}
if let Some(id32) = self.id32 {
write_ampersand(f)?;
write!(f, "xt=xt=urn:btmh:1220{}", id32.as_string(),)?;
write!(f, "xt=urn:btmh:1220{}", id32.as_string(),)?;
}
for tracker in self.trackers.iter() {
write_ampersand(f)?;
Expand Down

0 comments on commit fecc3f0

Please sign in to comment.