diff options
author | Chongyi Zheng <git@zcy.dev> | 2023-08-28 12:43:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 00:43:16 +0800 |
commit | ac2f8c9ac66a15a9e1799da3e8436928aeada53e (patch) | |
tree | e64e64555771df9849d9a6c8b7094cdcc08191a7 /services/pull | |
parent | 4803766f7a5d1ca86a1e62949dcd9a9ff8d0f64c (diff) | |
download | gitea-ac2f8c9ac66a15a9e1799da3e8436928aeada53e.tar.gz gitea-ac2f8c9ac66a15a9e1799da3e8436928aeada53e.zip |
Reduce some allocations in type conversion (#26772)
Diffstat (limited to 'services/pull')
-rw-r--r-- | services/pull/pull.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go index 0b6194b143..d4352abafe 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -755,11 +755,11 @@ func GetSquashMergeCommitMessages(ctx context.Context, pr *issues_model.PullRequ } for _, author := range authors { - if _, err := stringBuilder.Write([]byte("Co-authored-by: ")); err != nil { + if _, err := stringBuilder.WriteString("Co-authored-by: "); err != nil { log.Error("Unable to write to string builder Error: %v", err) return "" } - if _, err := stringBuilder.Write([]byte(author)); err != nil { + if _, err := stringBuilder.WriteString(author); err != nil { log.Error("Unable to write to string builder Error: %v", err) return "" } |