Closed alexis- closed 2 years ago
Thanks for the code review. Yes, it really is worth it.
In fact, I'm surprised I don't have warnings about not using explicitly ignoring return values via the discard pattern _ = Method()
;
I'm trying to figure out how to enable this permanently for all my projects.
It seems this line in .editorconfig
does not work in VS 2022 latest preview:
csharp_style_unused_value_assignment_preference = discard_variable:warning
Had to tinker to find why this diagnostic didn't work: https://github.com/dotnet/roslyn/issues/60875
Already fixed! Nice 👍
It's surprising that the unused_value_assignment bug made is this far into the release cycle of VS2022.
Hello,
First of all, this is a really nice project. I'm enjoying reading your code a lot, and this will definitely save me time so thanks. :)
While familiarizing myself with H.Pipes, I came across this bit in PipeStreamReader.cs
Shouldn't the return value (= number of bytes read) of ReadAsync be assigned and compared with the intended message length?