Skip to content

Commit 80c83f2

Browse files
committed
创建 CommandLine 时减少一次拷贝
1 parent f8256ad commit 80c83f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DotNetCampus.CommandLine/CommandLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static CommandLine Parse(IReadOnlyList<string> args, CommandLineParsingOp
114114
ArgumentNullException.ThrowIfNull(args);
115115
return args.Count is 0
116116
? new CommandLine()
117-
: new CommandLine([..args], parsingOptions);
117+
: new CommandLine(args, parsingOptions);
118118
}
119119

120120
/// <summary>

0 commit comments

Comments
 (0)