Replace TryCopyTo with CopyTo (#16078)
authorStephen Toub <stoub@microsoft.com>
Tue, 30 Jan 2018 15:17:30 +0000 (10:17 -0500)
committerGitHub <noreply@github.com>
Tue, 30 Jan 2018 15:17:30 +0000 (10:17 -0500)
commitefebb38f3c18425c57f94ff910a50e038d13c848
treec60ab6f3c0e465de3b27d4673be319cd4097d5bc
parentb039a4c266b3d64549c4a809b7ea28a69b600358
Replace TryCopyTo with CopyTo (#16078)

While doing various Span-related work involving copying, in a few places I previously used a pattern of calling TryCopyTo and then asserting its result, in places where I knew the destination was long enough.  This was because CopyTo was implemented as a wrapper around TryCopyTo and thus involved an extra unnecessary branch.  Now that that's no longer the case, I'm simplifying the call sites.
src/mscorlib/shared/System/Boolean.cs
src/mscorlib/shared/System/Number.Formatting.cs
src/mscorlib/shared/System/Text/ValueStringBuilder.cs