Skip to content

Commit

Permalink
Cleanup: use error instead of TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Oct 12, 2023
1 parent 6ffb238 commit d3feb01
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/command/parseCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private func parseSingleCommand(_ raw: String) -> ParsedCommand<Command> {
} else if firstWord == "mode" {
return parseSingleArg(args, firstWord).map { ModeCommand(idToActivate: $0) }
} else if firstWord == "resize" {
TODO()
error("'resize' command doesn't work yet")
} else if firstWord == "exec-and-wait" {
return .success(ExecAndWaitCommand(bashCommand: raw.removePrefix(firstWord)))
} else if firstWord == "exec-and-forget" {
Expand Down
5 changes: 0 additions & 5 deletions src/util/util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ func stringType(of some: Any) -> String {

@inlinable func error(_ message: String = "") -> Never { errorT(message) }

@inlinable func TODO(_ message: String = "") -> Never {
Thread.callStackSymbols.forEach { print($0) }
fatalError(message)
}

extension String? {
var isNilOrEmpty: Bool { self == nil || self == "" }
}
Expand Down

0 comments on commit d3feb01

Please sign in to comment.