Skip to content

Commit

Permalink
Update note.
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed Jun 29, 2022
1 parent ba23671 commit 8462ec4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/yew/src/platform/io.rs
Expand Up @@ -83,10 +83,10 @@ impl BufWriter {
} else {
// if the next part is more than buffer size, we send the next part.

// We don't need to drain the buffer here as the self.buf.capacity() only changes if
// the buffer was drained. If the buffer capacity didn't change, then it means
// self.buf.capacity() > s.len() which will be guaranteed to be matched by
// self.buf.capacity() >= s.len().
// We don't need to drain the buffer here as the result of self.has_capacity_of() only
// changes if the buffer was drained. If the buffer capacity didn't change,
// then it means self.has_capacity_of() has returned true the first time which will be
// guaranteed to be matched by the left hand side of this implementation.
let _ = self.tx.send(s.into_owned());
}
}
Expand Down

0 comments on commit 8462ec4

Please sign in to comment.