From 8462ec4a751fe425c1348392e6c83a13ff72f91c Mon Sep 17 00:00:00 2001 From: Kaede Hoshikawa Date: Wed, 29 Jun 2022 21:03:58 +0900 Subject: [PATCH] Update note. --- packages/yew/src/platform/io.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/yew/src/platform/io.rs b/packages/yew/src/platform/io.rs index ff696c17c6c..14e0e11d56e 100644 --- a/packages/yew/src/platform/io.rs +++ b/packages/yew/src/platform/io.rs @@ -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()); } }