Skip to content

Commit

Permalink
http: remove where clauses on structs
Browse files Browse the repository at this point in the history
  • Loading branch information
2bc4 committed Feb 19, 2024
1 parent 215f043 commit 496131d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
5 changes: 1 addition & 4 deletions src/http/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ use chunked_transfer::Decoder as ChunkDecoder;
use flate2::read::GzDecoder;
use log::debug;

enum Encoding<T>
where
T: Read,
{
enum Encoding<T: Read> {
Unencoded(T, u64),
Chunked(ChunkDecoder<T>),
ChunkedGzip(GzDecoder<ChunkDecoder<T>>),
Expand Down
15 changes: 3 additions & 12 deletions src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ impl TextRequest {
}
}

pub struct WriterRequest<T>
where
T: Write,
{
pub struct WriterRequest<T: Write> {
inner: Request<T>,
}

Expand Down Expand Up @@ -165,10 +162,7 @@ impl Method {
}
}

struct Request<T>
where
T: Write,
{
struct Request<T: Write> {
stream: Transport,
handler: Handler<T>,
raw: String,
Expand Down Expand Up @@ -372,10 +366,7 @@ impl Write for StringWriter {
}
}

struct Handler<T>
where
T: Write,
{
struct Handler<T: Write> {
writer: Option<T>,

written: usize,
Expand Down

0 comments on commit 496131d

Please sign in to comment.