mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
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:
parent
15ee2dac91
commit
e8bf58f6c3
3 changed files with 8 additions and 8 deletions
|
@ -24,7 +24,7 @@ namespace SourceGit.Models
|
|||
{
|
||||
var trimmedUrl = url.AsSpan();
|
||||
if (url.EndsWith(".git"))
|
||||
trimmedUrl = url.AsSpan().Slice(0, url.Length - 4);
|
||||
trimmedUrl = url.AsSpan(0, url.Length - 4);
|
||||
|
||||
if (url.StartsWith("https://github.com/", StringComparison.Ordinal))
|
||||
outs.Add(new($"Github ({trimmedUrl.Slice(19)})", $"{url}/commit/"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue