mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
ws protocol: remove glob exports; adjust dependent crates
This commit is contained in:
parent
27ecccd984
commit
0dae7fd533
10 changed files with 46 additions and 17 deletions
|
|
@ -1,7 +1,10 @@
|
|||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use std::time::Duration;
|
||||
|
||||
use aquatic_ws_protocol::*;
|
||||
use aquatic_ws_protocol::{
|
||||
common::*,
|
||||
incoming::{AnnounceEvent, AnnounceRequest, AnnounceRequestOffer, InMessage},
|
||||
};
|
||||
|
||||
pub fn bench(c: &mut Criterion) {
|
||||
let info_hash = InfoHash([
|
||||
|
|
|
|||
|
|
@ -14,16 +14,22 @@ pub mod common;
|
|||
pub mod incoming;
|
||||
pub mod outgoing;
|
||||
|
||||
pub use common::*;
|
||||
pub use incoming::*;
|
||||
pub use outgoing::*;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use quickcheck::Arbitrary;
|
||||
use quickcheck_macros::quickcheck;
|
||||
|
||||
use super::*;
|
||||
use crate::{
|
||||
common::*,
|
||||
incoming::{
|
||||
AnnounceEvent, AnnounceRequest, AnnounceRequestOffer, InMessage, ScrapeRequest,
|
||||
ScrapeRequestInfoHashes,
|
||||
},
|
||||
outgoing::{
|
||||
AnnounceResponse, AnswerOutMessage, OfferOutMessage, OutMessage, ScrapeResponse,
|
||||
ScrapeStatistics,
|
||||
},
|
||||
};
|
||||
|
||||
fn arbitrary_20_bytes(g: &mut quickcheck::Gen) -> [u8; 20] {
|
||||
let mut bytes = [0u8; 20];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue