From 2647cee911d72ebaf565c73caa890d2375dcfcaa Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 12 Aug 2024 00:41:33 +0200 Subject: [PATCH] Minor cleanup --- src/main.rs | 2 +- src/torrent.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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() {