Skip to content

Commit 8321b9a

Browse files
committed
Remove unnecessary default keyword
1 parent 6c8f0a6 commit 8321b9a

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
@@ -2463,17 +2463,15 @@ impl<R: Read> Iterator for Bytes<R> {
24632463
}
24642464
}
24652465

2466-
default fn size_hint(&self) -> (usize, Option<usize>) {
2466+
fn size_hint(&self) -> (usize, Option<usize>) {
24672467
(&self.inner as &dyn SizeHint).size_hint()
24682468
}
24692469
}
24702470

24712471
trait SizeHint {
24722472
fn lower_bound(&self) -> usize;
24732473

2474-
fn upper_bound(&self) -> Option<usize> {
2475-
None
2476-
}
2474+
fn upper_bound(&self) -> Option<usize>;
24772475

24782476
fn size_hint(&self) -> (usize, Option<usize>) {
24792477
(self.lower_bound(), self.upper_bound())
@@ -2484,6 +2482,10 @@ impl<T> SizeHint for T {
24842482
default fn lower_bound(&self) -> usize {
24852483
0
24862484
}
2485+
2486+
default fn upper_bound(&self) -> Option<usize> {
2487+
None
2488+
}
24872489
}
24882490

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

0 commit comments

Comments
 (0)