diff options
| author | Xavientois <joshua.rampersad@hotmail.com> | 2021-01-15 18:45:00 -0500 |
|---|---|---|
| committer | Xavientois <joshua.rampersad@hotmail.com> | 2021-01-31 08:31:34 -0500 |
| commit | eea99f491b6000a836a8887a29d1ce85c666fe47 (patch) | |
| tree | 84f62a50eb929792763a8614d0297094ed2fe475 | |
| parent | 5f60a3048ed0d6b2b56e253769fbd6593ccb1d71 (diff) | |
| download | rust-eea99f491b6000a836a8887a29d1ce85c666fe47.tar.gz rust-eea99f491b6000a836a8887a29d1ce85c666fe47.zip | |
Add default keyword for specialization
| -rw-r--r-- | library/std/src/io/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 53da2440945..712e808a024 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -2481,10 +2481,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> { #[stable(feature = "bufreader_size_hint", since = "1.51.0")] trait SizeHint { - fn lower_bound(&self) -> usize { - 0 - } - fn upper_bound(&self) -> Option<usize> { None } @@ -2495,7 +2491,11 @@ trait SizeHint { } #[stable(feature = "bufreader_size_hint", since = "1.51.0")] -impl<T> SizeHint for T {} +impl<T> SizeHint for T { + default fn lower_bound(&self) -> usize { + 0 + } +} #[stable(feature = "bufreader_size_hint", since = "1.51.0")] impl<T> SizeHint for BufReader<T> { |
