mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
write -> write_all, h/t clippy via @CGMossa
This commit is contained in:
parent
2a0de16b7b
commit
41ce7903a9
@ -564,7 +564,7 @@ mod test {
|
||||
#[test]
|
||||
fn socketpair() {
|
||||
let (mut a, mut b) = super::socketpair_impl().unwrap();
|
||||
a.write(b"hello").unwrap();
|
||||
a.write_all(b"hello").unwrap();
|
||||
let mut buf = [0u8; 5];
|
||||
assert_eq!(b.read(&mut buf).unwrap(), 5);
|
||||
assert_eq!(&buf, b"hello");
|
||||
|
@ -225,8 +225,8 @@ impl Write for OutputHandle {
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> IoResult<()> {
|
||||
if self.write_buffer.len() > 0 {
|
||||
self.handle.write(&self.write_buffer)?;
|
||||
if !self.write_buffer.is_empty() {
|
||||
self.handle.write_all(&self.write_buffer)?;
|
||||
self.write_buffer.clear();
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user