intro-to-rust-streams icon indicating copy to clipboard operation
intro-to-rust-streams copied to clipboard

Now, do_flush is removable

Open omid opened this issue 5 years ago • 1 comments

Just watched the stream, perfect.

Since the self in the flush method is &self, now you can change the following line to let _ = self.flush(); in the drop method, and get rid of the external method do_flush.

https://github.com/rylev/intro-to-rust-streams/blob/c2f7334042f62190d82f851036479085ecc0f072/src/main.rs#L48

omid avatar Dec 25 '20 12:12 omid

Thanks! Going to leave this open since I'd like to leave the code in this repo the way it is on the streams.

rylev avatar Jan 04 '21 09:01 rylev