1 Commits
v2 ... v3

Author SHA1 Message Date
Joey Eamigh
cce7f6266d fixing newline issue 2023-02-07 11:44:12 -05:00

View File

@@ -27,17 +27,16 @@ async fn main() {
let mut location_id: u32 = CHARLOTTE;
let mut buf = [0, 0, 0, 0];
println!("Enter a location id to override the default (Charlotte, NC): ");
let loc_input = io::stdin().read(&mut buf).await;
println!(
"Enter a location id to override the default (Charlotte, NC, {:?}): ",
CHARLOTTE
);
io::stdin().read(&mut buf).await.unwrap();
if loc_input.unwrap() > 1 {
location_id = String::from_utf8(buf.to_vec())
.unwrap()
.trim()
.parse()
.unwrap();
let loc = String::from_utf8(buf.to_vec()).unwrap().trim().parse();
if loc.is_ok() {
location_id = loc.unwrap();
}
eprintln!("Using default location (Charlotte, NC): {}", location_id);
println!("Looking for appointments at location id: {}", location_id);
loop {