code_review: PR #1292

Use syntax `String.AsSpan(int start, int len)` instead of `String.AsSpan().Slice(int start, int len)`

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-09 09:30:00 +08:00
parent 15ee2dac91
commit e8bf58f6c3
No known key found for this signature in database
3 changed files with 8 additions and 8 deletions

View file

@ -1502,7 +1502,7 @@ namespace SourceGit.Views
{
if (line.Content.Length > 10000)
{
builder.Append(line.Content.AsSpan().Slice(0, 1000));
builder.Append(line.Content.AsSpan(0, 1000));
builder.Append($"...({line.Content.Length - 1000} characters trimmed)");
}
else