Minor cleanup
This commit is contained in:
parent
ee092097c7
commit
2647cee911
@ -60,7 +60,7 @@ fn main() -> Result<()> {
|
|||||||
let resp = client.get(url).send()?;
|
let resp = client.get(url).send()?;
|
||||||
let status = resp.status();
|
let status = resp.status();
|
||||||
|
|
||||||
let body = resp.text()?;
|
let _body = resp.text()?;
|
||||||
println!("Response: {status}");
|
println!("Response: {status}");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -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::de::from_bytes;
|
||||||
use crate::bencode::ser::to_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)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct FileInfo {
|
pub struct FileInfo {
|
||||||
@ -96,9 +96,9 @@ impl Torrent {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::{env, fs};
|
|
||||||
use std::path::Path;
|
|
||||||
use crate::torrent::Torrent;
|
use crate::torrent::Torrent;
|
||||||
|
use std::path::Path;
|
||||||
|
use std::{env, fs};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn check_correct_info_hash() {
|
fn check_correct_info_hash() {
|
||||||
|
Loading…
Reference in New Issue
Block a user