mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-06 19:44:58 +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
|
@ -584,7 +584,7 @@ namespace SourceGit.ViewModels
|
|||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
var prefixLen = home.EndsWith('/') ? home.Length - 1 : home.Length;
|
||||
if (path.StartsWith(home, StringComparison.Ordinal))
|
||||
path = $"~{path.AsSpan().Slice(prefixLen)}";
|
||||
path = $"~{path.AsSpan(prefixLen)}";
|
||||
}
|
||||
|
||||
Title = $"[{workspace}] {name} ({path})";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue