Skip to content

Commit f234969

Browse files
author
Dane Slattery
committed
Appease clippy
1 parent 74c4e55 commit f234969

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

embedded-io/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,28 +372,30 @@ impl<const N: usize, R: ?Sized> BufReader<N, R> {
372372
&self.inner
373373
}
374374

375+
/// Gets a mutable reference to the underlying reader.
375376
pub fn get_mut(&mut self) -> &mut R {
376377
&mut self.inner
377378
}
378379

380+
/// Returns a reference to the internally buffered data.
381+
///
382+
/// Unlike `fill_buff` this will not attempt to fill the buffer it if is empty.
379383
pub fn buffer(&self) -> &[u8] {
380384
&self.buff
381385
}
382386

387+
/// Returns the number of bytes the internal buffer can hold at once.
383388
pub fn capacity(&self) -> usize {
384389
N
385390
}
386391

392+
/// Unwraps this [BufReader<N,R>], returning the underlying reader.
387393
pub fn into_inner(self) -> R
388394
where
389395
R: Sized,
390396
{
391397
self.inner
392398
}
393-
394-
pub fn discard_buffer(&mut self) {
395-
self.pos = 0;
396-
}
397399
}
398400

399401
impl<const N: usize, R: Read> BufReader<N, R> {

0 commit comments

Comments
 (0)