17 lines
461 B
Rust
17 lines
461 B
Rust
|
use crate::CurrentTaskInfo;
|
||
|
|
||
|
pub fn execute(current_task_info: Option<CurrentTaskInfo>) {
|
||
|
match current_task_info {
|
||
|
None => {
|
||
|
panic!("You don't have an active task.");
|
||
|
}
|
||
|
Some(info) => {
|
||
|
println!("Information about your current task:");
|
||
|
println!(" {}", info.task.name);
|
||
|
if let Some(link) = info.task.link {
|
||
|
println!(" link: {}", link);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|