From 6fdf7b121bcddbc0328703f34fdb0fee71e03dc8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 16 Sep 2020 02:16:27 +0200 Subject: lib.rs: Replace top-level `unwrap()`s with `Result`s Add a new `Error` type that we can return in the failure case. Still need to work out how to handle errors inside the diff callback. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 48e8f5d..f743256 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,5 +9,5 @@ fn main() { let repo = Repository::open(".").unwrap(); let todos = Todos { repo: &repo }; - todos.write_since(todos.master_tree(), &mut std::io::stdout()); + todos.write_since(todos.master_tree().unwrap(), &mut std::io::stdout()).unwrap(); } -- cgit v1.2.3