diff --git a/prototype/doubt-difftool/main.swift b/prototype/doubt-difftool/main.swift index ecbbb361d..70d6c0f59 100644 --- a/prototype/doubt-difftool/main.swift +++ b/prototype/doubt-difftool/main.swift @@ -3,9 +3,9 @@ import Doubt import Prelude import Madness -func benchmark(label: String? = nil, _ f: () -> T) -> T { +func benchmark(label: String? = nil, _ f: () throws -> T) rethrows -> T { let start = NSDate.timeIntervalSinceReferenceDate() - let result = f() + let result = try f() let end = NSDate.timeIntervalSinceReferenceDate() print((label.map { "\($0): " } ?? "") + "\(end - start)s") return result