Skip to content

Commit d2d8bcb

Browse files
committed
Typo fixes
1 parent 017ed5a commit d2d8bcb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/std/src/io/buffered.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ impl<'a, W: Write> Write for LineWriterShim<'a, W> {
962962
// Flush existing content to prepare for our write. We have to do this
963963
// before attempting to write `buf` in order to maintain consistency;
964964
// if we add `buf` to the buffer then try to flush it all at once,
965-
// we're obligated to return Ok(), which would mean supressing any
965+
// we're obligated to return Ok(), which would mean suppressing any
966966
// errors that occur during flush.
967967
self.buffer.flush_buf()?;
968968

@@ -1142,7 +1142,7 @@ impl<'a, W: Write> Write for LineWriterShim<'a, W> {
11421142
self.inner_mut().write_all(lines)?;
11431143
} else {
11441144
// If there is any buffered data, we add the incoming lines
1145-
// to that buffer before flushing, which saves us at lease
1145+
// to that buffer before flushing, which saves us at least
11461146
// one write call. We can't really do this with `write`,
11471147
// since we can't do this *and* not suppress errors *and*
11481148
// report a consistent state to the caller in a return
@@ -2024,7 +2024,7 @@ mod tests {
20242024
}
20252025

20262026
/// Test that, in cases where vectored writing is not enabled, the
2027-
/// LineWriter uses the normal `write` call, which more-corectly handles
2027+
/// LineWriter uses the normal `write` call, which more-correctly handles
20282028
/// partial lines
20292029
#[test]
20302030
fn line_vectored_ignored() {
@@ -2160,7 +2160,7 @@ mod tests {
21602160
}
21612161

21622162
/// Test that, if a write returns Ok(0) after a successful pre-flush, this
2163-
/// is propogated as Ok(0)
2163+
/// is propagated as Ok(0)
21642164
#[test]
21652165
fn line_buffer_write0_normal() {
21662166
let writer = ProgrammableSink {
@@ -2298,7 +2298,7 @@ mod tests {
22982298
}
22992299

23002300
/// Test that a normal, formatted writeln only results in a single write
2301-
/// call to the underlying writer. A naive implementaton of
2301+
/// call to the underlying writer. A naive implementation of
23022302
/// LineWriter::write_all results in two writes: one of the buffered data,
23032303
/// and another of the final substring in the formatted set
23042304
#[test]

0 commit comments

Comments
 (0)