Skip to content

Commit 7fca4d9

Browse files
tottotoseanmonstar
authored andcommitted
refactor(header): refactor redundant closure style
1 parent 3f0b7de commit 7fca4d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/header/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,12 @@ impl<T> HeaderMap<T> {
705705
.entries
706706
.len()
707707
.checked_add(additional)
708-
.ok_or_else(|| MaxSizeReached::new())?;
708+
.ok_or_else(MaxSizeReached::new)?;
709709

710710
if cap > self.indices.len() {
711711
let cap = cap
712712
.checked_next_power_of_two()
713-
.ok_or_else(|| MaxSizeReached::new())?;
713+
.ok_or_else(MaxSizeReached::new)?;
714714
if cap > MAX_SIZE {
715715
return Err(MaxSizeReached::new());
716716
}

0 commit comments

Comments
 (0)