Skip to content

Commit

Permalink
more lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwample committed Mar 7, 2024
1 parent dd5ad4c commit 940e771
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/obfs4/src/common/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod test {
let discard_fut = discard(s, d);

tokio::spawn(async move {
const MSG: &'static str = "abcdefghijklmnopqrstuvwxyz";
const MSG: &str = "abcdefghijklmnopqrstuvwxyz";
loop {
if let Err(e) = c.write(MSG.as_bytes()).await {
assert!(Instant::now() > expected_end);
Expand Down
9 changes: 3 additions & 6 deletions crates/obfs4/src/obfs4/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ use crate::{
drbg,
probdist::{self, WeightedDist},
},
obfs4::{
constants::*,
framing::{self, MessageTypes},
sessions::Session,
},
obfs4::{constants::*, framing, sessions::Session},
Result,
};

Expand Down Expand Up @@ -151,6 +147,7 @@ where
}
}

/*// TODO Apply pad_burst logic and IAT policy to packet assembly (probably as part of AsyncRead / AsyncWrite impl)
/// Attempts to pad a burst of data so that the last packet is of the length
/// `to_pad_to`. This can involve creating multiple packets, making this
/// slightly complex.
Expand Down Expand Up @@ -190,7 +187,7 @@ where
} else {
Ok(())
}
}
} */
}

impl<T> AsyncWrite for O4Stream<T>
Expand Down
10 changes: 5 additions & 5 deletions crates/ptrs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ pub mod client {
/// the client / server traits for creating connections / pluggable transports.
/// this is still in a TODO state.
pub trait ConnectExt: C1 {
fn connect_with_deadline<'a>(
&'a mut self,
fn connect_with_deadline(
&mut self,
deadline: Instant,
) -> Result<Self::Future, tokio::time::error::Elapsed>;
fn connect_with_timeout<'a>(
&'a mut self,
fn connect_with_timeout(
&mut self,
timeout: Duration,
) -> Result<Self::Future, tokio::time::error::Elapsed>;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ pub mod server {
// | +++++++++
//
//
impl<'a, RW: Send + 'static> T1<RW> for Passthrough {
impl<RW: Send + 'static> T1<RW> for Passthrough {
type OutRW = RW;
type OutErr = std::io::Error;

Expand Down

0 comments on commit 940e771

Please sign in to comment.