Skip to content

Commit b832181

Browse files
committed
style: Remove unused optional bindings
1 parent 5553d68 commit b832181

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.swiftlint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ disabled_rules:
44
- function_body_length
55
- line_length
66
- multiple_closures_with_trailing_closure
7-
- unused_optional_binding
87
- cyclomatic_complexity
98

109
# Optional: Customize length limits instead of disabling

FileBrowserClient/FileBrowserClient/FileListView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,10 @@ struct FileListView: View {
851851
}
852852

853853
func createResource(isDirectory: Bool) {
854-
guard let _ = auth.serverURL, let _ = auth.token else { return }
854+
guard auth.serverURL != nil, auth.token != nil else {
855+
errorMessage = "Invalid authorization. Please log out and log back in."
856+
return
857+
}
855858

856859
let formatter = ISO8601DateFormatter()
857860
formatter.formatOptions = [.withInternetDateTime, .withColonSeparatorInTimeZone]

0 commit comments

Comments
 (0)