pub fn load() -> Result<Self, Error> {
        let mut login = Login::default();
        let login_path = Path::new(LOGIN_NAME);
        if login_path.exists() {
            login = from_str(&read_to_string(login_path)?)?;
        } else {
            login.create_login()?;
        }

        Ok(login)
    }
/// Loads the login file or creates one if it doesn't exist.
Loads the login file or creates one if it doesn't exist.
Loads the login file or creates one if it doesn ' t exist .
pub fn load() -> Result<Self, Error> {
        let mut login = Login::default();
        let login_path = Path::new(LOGIN_NAME);
        if login_path.exists() {
            login = from_str(&read_to_string(login_path)?)?;
        } else {
            login.create_login()?;
        }
        Ok(login)
    }
pub fn load ( ) -> Result < Self , Error > { let mut login = Login :: default ( ) ; let login_path = Path :: new ( LOGIN_NAME ) ; if login_path . exists ( ) { login = from_str ( & read_to_string ( login_path ) ? ) ? ; } else { login . create_login ( ) ? ; } Ok ( login ) }
Loads the login file or creates one if it doesn't exist.
Loads the login file or creates one if it doesn ' t exist .