Prefer using collection expressions with implicit object creation when the type is apparent #455

Closed
marco-carvalho wants to merge 7 commits from prefer_collection_expression_implicit_object_creation into master
Showing only changes of commit 208b16cb58 - Show all commits

View File

@ -49,7 +49,7 @@ namespace Ryujinx.Common.Utilities
public static string SanitizeFileName(string fileName)
{
var reservedChars = new HashSet<char>(Path.GetInvalidFileNameChars());
HashSet<char> reservedChars = [.. Path.GetInvalidFileNameChars()];
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
}
}