mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
use HashSet rather than Distinct() for filtering duplicate rules in a list
This commit is contained in:
parent
cadaae4475
commit
43d100c309
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ private static List<string> GetRawRules(string content)
|
|||
var rawRules = content.Split(new[] {"\r\n", "\r", "\n"}, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
for (var i = 0; i < rawRules.Count; i++)
|
||||
rawRules[i] = rawRules[i].LintStringForMySql();
|
||||
return rawRules.Where(x => !string.IsNullOrWhiteSpace(x)).Distinct().ToList();
|
||||
return new List<string>(new HashSet<string>(rawRules.Where(x => !string.IsNullOrWhiteSpace(x))));
|
||||
}
|
||||
|
||||
private IEnumerable<SnapshotBatchDe> GetSnapshotBatches(List<string> rawRules)
|
||||
|
|
|
|||
Loading…
Reference in a new issue