[Wox.Infrastructure] Enable analyzer and fix warnings (#16996)

This commit is contained in:
CleanCodeDeveloper
2022-03-14 16:44:17 +01:00
committed by GitHub
parent 7365ba14d0
commit 561882c2f1
7 changed files with 15 additions and 10 deletions

View File

@@ -29,12 +29,12 @@ namespace Wox.Infrastructure.Storage
{
}
public void SetList(IList<T> items)
public void SetList(IList<T> list)
{
// enforce that internal representation
try
{
_items = new ConcurrentDictionary<int, T>(items.ToDictionary(i => i.GetHashCode()));
_items = new ConcurrentDictionary<int, T>(list.ToDictionary(i => i.GetHashCode()));
}
catch (ArgumentException e)
{

View File

@@ -99,7 +99,7 @@ namespace Wox.Infrastructure.Storage
suffix = jsonSuffix;
}
string filePath = associatedFilePath.Substring(0, associatedFilePath.Length - suffix.Length) + "_version.txt";
string filePath = string.Concat(associatedFilePath.AsSpan(0, associatedFilePath.Length - suffix.Length), "_version.txt");
return filePath;
}