pub fn parse_u64(arg: &str, name: &str) -> Result<u64, Error> {
	let val = arg.parse::<u64>();
	match val {
		Ok(v) => Ok(v),
		Err(e) => {
			let msg = format!("Could not parse {} as a whole number. e={}", name, e);
			Err(ErrorKind::ArgumentError(msg).into())
		}
	}
}
// parses a number, or throws error with message otherwise
parses a number, or throws error with message otherwise
parses a number or throws error with message otherwise
pub fn parse_u64(arg: &str, name: &str) -> Result<u64, Error> {
	let val = arg.parse::<u64>();
	match val {
		Ok(v) => Ok(v),
		Err(e) => {
			let msg = format!("Could not parse {} as a whole number. e={}", name, e);
			Err(ErrorKind::ArgumentError(msg).into())
		}
	}
}
pub fn parse_u64 ( arg : & str , name : & str ) -> Result < u64 , Error > { let val = arg . parse :: < u64 > ( ) ; match val { Ok ( v ) => Ok ( v ) , Err ( e ) => { let msg = format ! ( " " name e ) ; Err ( ErrorKind :: ArgumentError ( msg ) . into ( ) ) } } }
parses a number, or throws error with message otherwise
parses a number or throws error with message otherwise
arg
&str
name
&str