Skip to content

Commit 7869371

Browse files
committed
Remove unnecessary default keyword
1 parent 93870c8 commit 7869371

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

library/std/src/io/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,17 +2466,15 @@ impl<R: Read> Iterator for Bytes<R> {
24662466
}
24672467
}
24682468

2469-
default fn size_hint(&self) -> (usize, Option<usize>) {
2469+
fn size_hint(&self) -> (usize, Option<usize>) {
24702470
(&self.inner as &dyn SizeHint).size_hint()
24712471
}
24722472
}
24732473

24742474
trait SizeHint {
24752475
fn lower_bound(&self) -> usize;
24762476

2477-
fn upper_bound(&self) -> Option<usize> {
2478-
None
2479-
}
2477+
fn upper_bound(&self) -> Option<usize>;
24802478

24812479
fn size_hint(&self) -> (usize, Option<usize>) {
24822480
(self.lower_bound(), self.upper_bound())
@@ -2487,6 +2485,10 @@ impl<T> SizeHint for T {
24872485
default fn lower_bound(&self) -> usize {
24882486
0
24892487
}
2488+
2489+
default fn upper_bound(&self) -> Option<usize> {
2490+
None
2491+
}
24902492
}
24912493

24922494
impl<T> SizeHint for BufReader<T> {

0 commit comments

Comments
 (0)