diff --git a/src/Uno.UI/UI/Xaml/XamlScope.cs b/src/Uno.UI/UI/Xaml/XamlScope.cs index b25ef36903e9..05e3a04e74e4 100644 --- a/src/Uno.UI/UI/Xaml/XamlScope.cs +++ b/src/Uno.UI/UI/Xaml/XamlScope.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Text; +using System.Collections.Immutable; using Uno.UI.DataBinding; namespace Microsoft.UI.Xaml @@ -11,7 +8,7 @@ namespace Microsoft.UI.Xaml /// opposed to the visual tree. In particular it allows correct resolution during template resolution, where the visual tree may be /// arbitrarily distant from the xaml tree. /// - internal record XamlScope(ImmutableStack Sources) + internal readonly record struct XamlScope(ImmutableStack Sources) { public XamlScope Push(ManagedWeakReference source) => new(Sources.Push(source));