diff --git a/src/main.rs b/src/main.rs index 348eb58..e0f3059 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ fn main() -> Result<()> { let resp = client.get(url).send()?; let status = resp.status(); - let body = resp.text()?; + let _body = resp.text()?; println!("Response: {status}"); Ok(()) diff --git a/src/torrent.rs b/src/torrent.rs index f1084d3..20e1326 100644 --- a/src/torrent.rs +++ b/src/torrent.rs @@ -1,10 +1,10 @@ -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; -use std::path; -use serde_bytes::ByteBuf; -use sha1::{Digest, Sha1}; -use serde::ser::SerializeSeq; use crate::bencode::de::from_bytes; use crate::bencode::ser::to_bytes; +use serde::ser::SerializeSeq; +use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use serde_bytes::ByteBuf; +use sha1::{Digest, Sha1}; +use std::path; #[derive(Serialize, Deserialize, Debug)] pub struct FileInfo { @@ -96,9 +96,9 @@ impl Torrent { #[cfg(test)] mod tests { - use std::{env, fs}; - use std::path::Path; use crate::torrent::Torrent; + use std::path::Path; + use std::{env, fs}; #[test] fn check_correct_info_hash() {