From 4b994b808a8b0b03e95067c352e9d230ebec92d6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 29 Jul 2020 00:43:12 +0200 Subject: Suggestion: Remove `unwrap`s and return `Result`s from diff methods Extend the `Error` enum with new variants to capture the possible errors from `diff()` and `diff_with_repo()`. --- src/bin/git-sugpatch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/git-sugpatch.rs') diff --git a/src/bin/git-sugpatch.rs b/src/bin/git-sugpatch.rs index 1e21923..4b0a24b 100644 --- a/src/bin/git-sugpatch.rs +++ b/src/bin/git-sugpatch.rs @@ -21,5 +21,5 @@ fn main() { let suggestion = client.fetch(&url.comment_id).unwrap(); - print!("{}", suggestion.diff()); + print!("{}", suggestion.diff().unwrap()); } -- cgit v1.2.3