You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is unclear that MemReader operates on an owned vector while BufReader on a borrowed vector. For the reader I think there is no difference between a MemReader and a BufReader. MemReader::new([1u8]) can be replaced by BufReader::new([1u8].as_slice()). Only the MemWriter and BufWriter differ in that MemWriter can grow the buffer.
How about this naming: BufReader, BufWriter, GrowableBufWriter?
The text was updated successfully, but these errors were encountered:
[`map_entry`]: call the visitor on the local's `else` block
Fixesrust-lang#12489
The lint already has all the logic it needs for figuring out if it can or can't suggest a closure if it sees control flow expressions like `break` or `continue`, but it was ignoring the local's else block, which meant that it didn't see the `return None;` in a `let..else`.
changelog: [`map_entry`]: suggest `if let` instead of a closure when `return` expressions exist in the else block of a `let..else`
It is unclear that MemReader operates on an owned vector while BufReader on a borrowed vector. For the reader I think there is no difference between a MemReader and a BufReader.
MemReader::new(
can be replaced by[1u8])BufReader::new([1u8].as_slice())
. Only the MemWriter and BufWriter differ in that MemWriter can grow the buffer.How about this naming:
BufReader
,BufWriter
,GrowableBufWriter
?The text was updated successfully, but these errors were encountered: