From 978d23a6a9acf258792bb7ed2438cc65f5caa363 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 27 Oct 2024 11:41:19 +0800 Subject: [PATCH] Chore: fix some typos --- src/coreclr/gc/gc.cpp | 2 +- .../tests/RegisteredTypesTests.cs | 4 ++-- .../System.Net.Http/src/System/Net/Http/DiagnosticsHelper.cs | 2 +- .../ManagedSequential/LargeStructSize_CoreCLR.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 5a05abdec901b..81356132f8664 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -48951,7 +48951,7 @@ HRESULT GCHeap::Initialize() // Adjust GCRegionSize based on how large each heap would be, for smaller heaps we would // like to keep Region sizes small. We choose between 4, 2 and 1mb based on the calculations - // below (unless its configured explictly) such that there are at least 2 regions available + // below (unless its configured explicitly) such that there are at least 2 regions available // except for the smallest case. Now the lowest limit possible is 4mb. if (gc_region_size == 0) { diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/RegisteredTypesTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/RegisteredTypesTests.cs index 371515eb0202b..1151043c49ebc 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/RegisteredTypesTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/RegisteredTypesTests.cs @@ -199,7 +199,7 @@ public static void GetMembersFromRegisteredType_BaseClassUnregistered_SwitchOn() Assert.Equal(2, properties[1].GetChildProperties().Count); Assert.Equal("Bool", properties[1].GetChildProperties()[0].Name); - // Even though C1.Class.Base is not explictely registered, we should still be able to get the properties of Base. + // Even though C1.Class.Base is not explicitly registered, we should still be able to get the properties of Base. Assert.Equal("String", properties[1].GetChildProperties()[1].Name); }, options).Dispose(); } @@ -220,7 +220,7 @@ public static void GetPropertiesFromRegisteredTypeInstance() Assert.Equal(2, properties[1].GetChildProperties().Count); Assert.Equal("Bool", properties[1].GetChildProperties()[0].Name); - // Even though C1.Class.Base is not explictely registered, we should still be able to get the properties of Base. + // Even though C1.Class.Base is not explicitly registered, we should still be able to get the properties of Base. Assert.Equal("String", properties[1].GetChildProperties()[1].Name); }).Dispose(); } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHelper.cs b/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHelper.cs index d47ecde26a14e..18b3f5b5d32cc 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHelper.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/DiagnosticsHelper.cs @@ -105,7 +105,7 @@ public static bool TryGetErrorType(HttpResponseMessage? response, Exception? exc private static object[]? s_boxedStatusCodes; private static string[]? s_statusCodeStrings; -#pragma warning disable CA1859 // we explictly box here +#pragma warning disable CA1859 // we explicitly box here // Returns a pooled object if 'value' is between 0-512, // saving allocations for standard HTTP status codes and small port tag values. public static object GetBoxedInt32(int value) diff --git a/src/tests/Loader/classloader/SequentialLayout/ManagedSequential/LargeStructSize_CoreCLR.cs b/src/tests/Loader/classloader/SequentialLayout/ManagedSequential/LargeStructSize_CoreCLR.cs index 0588a19265b7a..bedc78d7054d2 100644 --- a/src/tests/Loader/classloader/SequentialLayout/ManagedSequential/LargeStructSize_CoreCLR.cs +++ b/src/tests/Loader/classloader/SequentialLayout/ManagedSequential/LargeStructSize_CoreCLR.cs @@ -40,7 +40,7 @@ struct Y } [StructLayout(LayoutKind.Explicit)] - struct Y_explict + struct Y_explicit { [FieldOffset(0)] BigArray b; @@ -64,7 +64,7 @@ public static void TestLargeStructSize() // Explicit struct of big size triggers out of memory error instead of type load exception Assert.Throws(() => sizeof(X_explicit)); Assert.Throws(() => sizeof(X_non_blittable)); - Assert.Throws(() => sizeof(Y_explict)); + Assert.Throws(() => sizeof(Y_explicit)); } } }