We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aafe157 commit 92edd44Copy full SHA for 92edd44
1 file changed
src/DocoptNet/Internals/ReadOnlyList.cs
@@ -24,10 +24,8 @@ static class ReadOnlyList
24
25
readonly partial struct ReadOnlyList<T> : IReadOnlyList<T>
26
{
27
- readonly IList<T> _list;
28
-
29
- public ReadOnlyList(IList<T> list) => _list = list;
30
- IList<T> List => _list ?? Array.Empty<T>();
+ public ReadOnlyList(IList<T> list) => List = list;
+ IList<T> List => field ?? Array.Empty<T>();
31
public int Count => List.Count;
32
public T this[int index] => List[index];
33
public IEnumerator<T> GetEnumerator() => List.GetEnumerator();
0 commit comments