mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
Run rustfmt, clean up aquatic_http_protocol/Cargo.toml
This commit is contained in:
parent
0cc312a78d
commit
d0e716f80b
65 changed files with 1754 additions and 2590 deletions
|
|
@ -1,11 +1,10 @@
|
|||
use std::sync::{Arc, atomic::AtomicUsize};
|
||||
use std::sync::{atomic::AtomicUsize, Arc};
|
||||
|
||||
use rand_distr::Pareto;
|
||||
|
||||
pub use aquatic_http_protocol::common::*;
|
||||
pub use aquatic_http_protocol::response::*;
|
||||
pub use aquatic_http_protocol::request::*;
|
||||
|
||||
pub use aquatic_http_protocol::response::*;
|
||||
|
||||
#[derive(PartialEq, Eq, Clone)]
|
||||
pub struct TorrentPeer {
|
||||
|
|
@ -15,7 +14,6 @@ pub struct TorrentPeer {
|
|||
pub port: u16,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Statistics {
|
||||
pub requests: AtomicUsize,
|
||||
|
|
@ -27,7 +25,6 @@ pub struct Statistics {
|
|||
pub bytes_received: AtomicUsize,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct LoadTestState {
|
||||
pub info_hashes: Arc<Vec<InfoHash>>,
|
||||
|
|
@ -35,9 +32,8 @@ pub struct LoadTestState {
|
|||
pub pareto: Arc<Pareto<f64>>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Copy)]
|
||||
pub enum RequestType {
|
||||
Announce,
|
||||
Scrape
|
||||
}
|
||||
Scrape,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue