From 86514a1421cd01c22115ecb64f851de40cc24656 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Thu, 11 Jan 2024 10:51:46 +0400 Subject: [PATCH] Rename TOther to TResult --- .../FlatArray/FlatArray.T/FlatArray.CastArray.Try.cs | 8 ++++---- .../FlatArray/FlatArray.T/FlatArray.CastArray.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.Try.cs b/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.Try.cs index 06e2b5f..f75907f 100644 --- a/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.Try.cs +++ b/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.Try.cs @@ -3,17 +3,17 @@ partial struct FlatArray { // TODO: Add the tests and make public - internal FlatArray? TryCastArray() + internal FlatArray? TryCastArray() { // Safe array cast: 'as' cast - if (InnerItems() is not TOther[] otherItems) + if (InnerItems() is not TResult[] resultItems) { return null; } - var otherItemsNormalized = items is null ? null : otherItems; + var resultItemsNormalized = items is null ? null : resultItems; - return new(length, otherItemsNormalized, default); + return new(length, resultItemsNormalized, default); } } diff --git a/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.cs b/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.cs index 329b21c..733232d 100644 --- a/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.cs +++ b/src/flatcollections-array/FlatArray/FlatArray.T/FlatArray.CastArray.cs @@ -3,14 +3,14 @@ partial struct FlatArray { // TODO: Add the tests and make public - internal FlatArray CastArray() + internal FlatArray CastArray() { // Unsafe array cast: InvalidCastException is expected - var otherItems = (TOther[])(object)InnerItems(); + var resultItems = (TResult[])(object)InnerItems(); - var otherItemsNormalized = items is null ? null : otherItems; + var resultItemsNormalized = items is null ? null : resultItems; - return new(length, otherItemsNormalized, default); + return new(length, resultItemsNormalized, default); } }