Flow.Launcher/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs
Jack251970 43d3963e3d Make SearchResult readonly and init HighlightData to empty list
Changed SearchResult to a readonly record struct for better immutability and performance. Updated HighlightData to initialize as an empty list using a collection expression instead of null. Retained the default constructor with a clarifying comment.
2026-01-05 09:45:32 +08:00

19 lines
497 B
C#

using System.Collections.Generic;
namespace Flow.Launcher.Plugin.Explorer.Search
{
public readonly record struct SearchResult
{
// Constructor is necesssary for record struct
public SearchResult()
{
}
public string FullPath { get; init; }
public ResultType Type { get; init; }
public int Score { get; init; }
public bool WindowsIndexed { get; init; }
public List<int> HighlightData { get; init; } = [];
}
}