From db2578ea92736355f2998db091a7cc8fd21cbbf8 Mon Sep 17 00:00:00 2001 From: Mika Attila Date: Tue, 3 Nov 2015 00:55:09 +0100 Subject: [PATCH] Use fmt::Result --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index cdf0a871..d998dfc1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,7 @@ pub enum ContextCreationError { } impl fmt::Display for ContextCreationError { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use ContextCreationError::*; match *self { AlreadyExists => write!(f, "A Libnotify context already exists."), @@ -56,7 +56,7 @@ pub enum NotificationCreationError { } impl fmt::Display for NotificationCreationError { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use NotificationCreationError::*; match *self { NulError => write!(f, "Argument contains a nul character."),