print separator
This commit is contained in:
parent
7e5461ed81
commit
ac6dbcf54c
1 changed files with 8 additions and 1 deletions
|
@ -41,9 +41,16 @@ async fn main() {
|
||||||
.name("letter")
|
.name("letter")
|
||||||
.map(|c| c.as_str().chars().next().expect("Error in letter"));
|
.map(|c| c.as_str().chars().next().expect("Error in letter"));
|
||||||
|
|
||||||
|
// Show a separator only if we need one
|
||||||
|
let seperator = match letter {
|
||||||
|
Some(_) => "-",
|
||||||
|
None => "",
|
||||||
|
};
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Fetch the timetable for L{}{}...",
|
"Fetch the timetable for L{}{}{}...",
|
||||||
year,
|
year,
|
||||||
|
seperator,
|
||||||
letter.unwrap_or_default()
|
letter.unwrap_or_default()
|
||||||
);
|
);
|
||||||
let timetable = timetable::timetable(year, args.semester, letter).await;
|
let timetable = timetable::timetable(year, args.semester, letter).await;
|
||||||
|
|
Reference in a new issue