mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
minimize temporary strings for better performance
This commit is contained in:
parent
36c2e083cc
commit
a5a8fbc9f5
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -387,7 +387,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder();
|
var builder = new StringBuilder();
|
||||||
foreach (var c in selected)
|
foreach (var c in selected)
|
||||||
builder.AppendLine($"{c.SHA.Substring(0, 10)} - {c.Subject}");
|
builder.AppendLine($"{c.SHA.AsSpan(0, 10)} - {c.Subject}");
|
||||||
|
|
||||||
App.CopyText(builder.ToString());
|
App.CopyText(builder.ToString());
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
@ -780,7 +780,7 @@ namespace SourceGit.ViewModels
|
||||||
copyInfo.Icon = App.CreateMenuIcon("Icons.Info");
|
copyInfo.Icon = App.CreateMenuIcon("Icons.Info");
|
||||||
copyInfo.Click += (_, e) =>
|
copyInfo.Click += (_, e) =>
|
||||||
{
|
{
|
||||||
App.CopyText($"{commit.SHA.Substring(0, 10)} - {commit.Subject}");
|
App.CopyText($"{commit.SHA.AsSpan(0, 10)} - {commit.Subject}");
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue