mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-06 03:24:59 +00:00
refactor: use String.AsSpan(int, int)
instead of String.AsSpan().Slice(int, int)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
48bb8e91de
commit
825b74c2a3
12 changed files with 20 additions and 20 deletions
|
@ -40,7 +40,7 @@ namespace SourceGit.Commands
|
|||
if (dateEndIdx == -1)
|
||||
return;
|
||||
|
||||
var dateStr = line.AsSpan().Slice(0, dateEndIdx);
|
||||
var dateStr = line.AsSpan(0, dateEndIdx);
|
||||
if (double.TryParse(dateStr, out var date))
|
||||
statistics.AddCommit(line.Substring(dateEndIdx + 1), date);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue