Uh oh!
There was an error while loading. Please reload this page.
Do not ignore MemoryMarshal.TryWrite result - #108661
Conversation
xtqqczze
commented
Oct 8, 2024
stephentoub
commented
Oct 8, 2024
What is the concern? |
xtqqczze
commented
Oct 8, 2024
Code style, it is unidiomatic to ignore the return value of a |
All the In S.S.Cryptography we do use boolret=MemoryMarshal.TryWrite(bytes,inthis);Debug.Assert(ret); |
Tagging subscribers to this area: @dotnet/area-system-runtime |
am11
commented
Oct 9, 2024
xtqqczze
commented
Oct 9, 2024
@stephentoub It looks the use of |
stephentoub
commented
Nov 17, 2024
Just doesn't seem worth the churn to me. |
MemoryMarshal.TryWrite result in GuidMemoryMarshal.TryWrite resultxtqqczze
commented
Dec 14, 2024
xtqqczze
commented
Dec 14, 2024
@stephentoub minimized churn and rebased |
xtqqczze
commented
Dec 14, 2024
|
tannergooding
commented
Jan 10, 2025
@stephentoub any concern with the new version that switches it to just use This is very minor code cleanup, and so if we don't want to take the churn here I'd be liable to just close it. |
stephentoub
commented
Jan 10, 2025
I'm fine either way. |
tannergooding
commented
Jan 10, 2025
I'll take this then since it does remove the ignored result and makes the code a little bit cleaner. |
* main: JIT: Model GT_RETURN kills with contained operand (dotnet#111230) Update dependencies from https://github.com/dotnet/runtime-assets build 20250110.2 (dotnet#111290) [NativeAOT/ARM64] Generate frames compatible with Apple compact unwinding (dotnet#107766) Cleanup unused JIT stubs in vm (dotnet#111237) Ensure that Shuffle is marked as HW_Flag_CanBenefitFromConstantProp (dotnet#111303) Fix CMP0173 policy warning with cmake 3.31 (dotnet#110522) [RISC-V] Fix HostActivation.Tests unknown-rid (dotnet#110687) Fix accidentally duplicated global-build-step.yml in runtime-official.yml (dotnet#111302) JIT: run extra SPMI queries for arrays (dotnet#111293) Split the Runtime Shared Framework project and combine legs in the official build (dotnet#111136) Do not ignore `MemoryMarshal.TryWrite` result (dotnet#108661) Update dependencies from https://github.com/dotnet/emsdk build 20250109.1 (dotnet#111263) Clean up in Number.Formatting.cs (dotnet#110955)
It is unidiomatic to ignore the return value of a Try method.
Supersedes #104728