@@ -26,25 +26,25 @@ pub enum Error {
2626}
2727
2828impl From < std:: io:: Error > for Error {
29- fn from ( err : std:: io:: Error ) -> Self {
30- Error :: ProcessError ( err)
31- }
29+ fn from ( err : std:: io:: Error ) -> Self {
30+ Error :: ProcessError ( err)
31+ }
3232}
3333
3434impl From < std:: ffi:: NulError > for Error {
35- fn from ( err : std:: ffi:: NulError ) -> Self {
36- Error :: FfiNull ( err)
37- }
35+ fn from ( err : std:: ffi:: NulError ) -> Self {
36+ Error :: FfiNull ( err)
37+ }
3838}
3939
4040impl std:: fmt:: Display for Error {
41- fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> Result < ( ) , std:: fmt:: Error > {
42- match * self {
43- Error :: ProcessError ( ref e) => write ! ( f, "{}" , e) ,
44- Error :: FfiNull ( ref e) => write ! ( f, "{}" , e) ,
41+ fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> Result < ( ) , std:: fmt:: Error > {
42+ match * self {
43+ Error :: ProcessError ( ref e) => write ! ( f, "{}" , e) ,
44+ Error :: FfiNull ( ref e) => write ! ( f, "{}" , e) ,
4545 Error :: WindowsShellExecute => write ! ( f, "WindowsShellExecute failed" ) ,
46- }
47- }
46+ }
47+ }
4848}
4949
5050#[ cfg( windows) ]
@@ -64,7 +64,7 @@ pub fn open(url: &str) -> Result<(), Error> {
6464 ptr:: null ( ) ,
6565 ptr:: null ( ) ,
6666 Normal ) as INT
67- } ;
67+ } ;
6868 // https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx
6969 // `ShellExecute` returns a value greater than 32 on success
7070 if h_instance > WINDOWS_SHELL_EXECUTE_SUCCESS { Ok ( ( ) ) } else { Err ( Error :: WindowsShellExecute ) }
0 commit comments