mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20: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
|
@ -105,7 +105,7 @@ namespace SourceGit.Commands
|
|||
}
|
||||
else if (line.StartsWith("-size ", StringComparison.Ordinal))
|
||||
{
|
||||
_result.LFSDiff.Old.Size = long.Parse(line.AsSpan().Slice(6));
|
||||
_result.LFSDiff.Old.Size = long.Parse(line.AsSpan(6));
|
||||
}
|
||||
}
|
||||
else if (ch == '+')
|
||||
|
@ -116,12 +116,12 @@ namespace SourceGit.Commands
|
|||
}
|
||||
else if (line.StartsWith("+size ", StringComparison.Ordinal))
|
||||
{
|
||||
_result.LFSDiff.New.Size = long.Parse(line.AsSpan().Slice(6));
|
||||
_result.LFSDiff.New.Size = long.Parse(line.AsSpan(6));
|
||||
}
|
||||
}
|
||||
else if (line.StartsWith(" size ", StringComparison.Ordinal))
|
||||
{
|
||||
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.AsSpan().Slice(6));
|
||||
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.AsSpan(6));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue