// This function open the configured editor for the user.
// It return once the spawned process has exit, catching any
// errors via exit status.
This function open the configured editor for the user.
It return once the spawned process has exit, catching any
errors via exit status.
This function open the configured editor for the user . It return once the spawned process has exit catching any errors via exit status .
pub fn editor<T:AsRef<ffi::OsStr>+Sized>(path: T) {
    match process::Command::new(&CONFIG.editor).arg(path.as_ref()).spawn() {
        Ok(mut child) => {
            match child.wait() {
                Ok(_) => (),
                Err(err) => {
                    panic!("Error editor {} exit with != 0\n{}",
                           &CONFIG.editor, err);
                },
            }
        },
        Err(err) => {
            panic!("Error when starting {} {:?}\n{}",
                   &CONFIG.editor, path.as_ref(), err);
        },
    };
}
pub fn editor < T : AsRef < ffi :: OsStr > + Sized > ( path : T ) { match process :: Command :: new ( & CONFIG . editor ) . arg ( path . as_ref ( ) ) . spawn ( ) { Ok ( mut child ) => { match child . wait ( ) { Ok ( _ ) => ( ) , Err ( err ) => { panic ! ( " \n " CONFIG editor err ) ; } , } } , Err ( err ) => { panic ! ( " \n " CONFIG editor path as_ref ( ) err ) ; } , } ; }
This function open the configured editor for the user.
This function open the configured editor for the user .
path
T