From d8fa88d6229b49c3780b0e04c6f3237edd95f8c6 Mon Sep 17 00:00:00 2001 From: niklasad1 Date: Thu, 12 Apr 2018 09:07:57 +0200 Subject: [PATCH] formatting --- parity/url.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/parity/url.rs b/parity/url.rs index 5a7eada6ef7..fa82fbb590d 100644 --- a/parity/url.rs +++ b/parity/url.rs @@ -26,25 +26,25 @@ pub enum Error { } impl From for Error { - fn from(err: std::io::Error) -> Self { - Error::ProcessError(err) - } + fn from(err: std::io::Error) -> Self { + Error::ProcessError(err) + } } impl From for Error { - fn from(err: std::ffi::NulError) -> Self { - Error::FfiNull(err) - } + fn from(err: std::ffi::NulError) -> Self { + Error::FfiNull(err) + } } impl std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match *self { - Error::ProcessError(ref e) => write!(f, "{}", e), - Error::FfiNull(ref e) => write!(f, "{}", e), + fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { + match *self { + Error::ProcessError(ref e) => write!(f, "{}", e), + Error::FfiNull(ref e) => write!(f, "{}", e), Error::WindowsShellExecute => write!(f, "WindowsShellExecute failed"), - } - } + } + } } #[cfg(windows)] @@ -64,7 +64,7 @@ pub fn open(url: &str) -> Result<(), Error> { ptr::null(), ptr::null(), Normal) as INT - }; +}; // https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx // `ShellExecute` returns a value greater than 32 on success if h_instance > WINDOWS_SHELL_EXECUTE_SUCCESS { Ok(()) } else { Err(Error::WindowsShellExecute) }