修复编译警告

This commit is contained in:
2026-07-15 23:33:33 +08:00
parent ac2eac5fcd
commit 4340fd3635
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -39,7 +39,7 @@ class ClipEditViewController: UIViewController {
private func setupNavigationBar() { private func setupNavigationBar() {
let saveButton = UIBarButtonItem( let saveButton = UIBarButtonItem(
title: "保存", title: "保存",
style: .done, style: .prominent,
target: self, target: self,
action: #selector(didTapSaveButton) action: #selector(didTapSaveButton)
) )
@@ -85,8 +85,9 @@ class ClipEditViewController: UIViewController {
Task { Task {
do { do {
try await ClipStore.shared.update(updatedClip) try await ClipStore.shared.update(updatedClip)
await MainActor.run { _ = await MainActor.run {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
return ()
} }
} catch { } catch {
await MainActor.run { await MainActor.run {
+1 -1
View File
@@ -38,7 +38,7 @@ enum TextFormatter {
return content return content
} }
static func formatForShortcut(_ text: String) -> String { static nonisolated func formatForShortcut(_ text: String) -> String {
var content = text var content = text
content = content.replacingOccurrences(of: " ", with: "") content = content.replacingOccurrences(of: " ", with: "")
content = content.replacingOccurrences(of: " ", with: "") content = content.replacingOccurrences(of: " ", with: "")