Skip to content

Commit

Permalink
refactor(request): Remove intermediate variable
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Wong committed Jan 4, 2025
1 parent 805e93d commit e452ad7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ impl TryFrom<&mut dyn Read> for Request {
type Error = RequestParsingError;

fn try_from(value: &mut dyn Read) -> Result<Self, RequestParsingError> {
let buf_reader = BufReader::new(value);
let mut lines = buf_reader
let mut lines = BufReader::new(value)
.lines()
.map(|result| result.unwrap())
.take_while(|line| !line.is_empty());
Expand Down

0 comments on commit e452ad7

Please sign in to comment.