Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

Commit

Permalink
Remove unnecessary try! statements
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed May 18, 2020
1 parent a9b2db6 commit 1b71ea4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions QLPlugin/Views/Previews/AppleScriptPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import SwiftExec
class AppleScriptPreview: CodePreview {
override func getSource(file: File) throws -> String {
if file.url.pathExtension == "scpt" || file.url.pathExtension == "scptd" {
let result = try! exec(
let result = try exec(
program: "/usr/bin/osadecompile",
arguments: [file.path]
)
return result.stdout ?? ""
}
return try! file.read()
return try file.read()
}
}
2 changes: 1 addition & 1 deletion QLPlugin/Views/Previews/CodePreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CodePreview: Preview {
}

func getSource(file: File) throws -> String {
try! file.read()
try file.read()
}

private func getHTML(file: File) throws -> String {
Expand Down

0 comments on commit 1b71ea4

Please sign in to comment.