chore: cleanups and refactorings for cleaner code
This commit is contained in:
@@ -56,9 +56,12 @@ pub enum PanelTab {
|
||||
pub struct TaskSnapshot {
|
||||
pub id: u64,
|
||||
pub label: String,
|
||||
pub group_id: Option<String>,
|
||||
pub group_name: Option<String>,
|
||||
pub status: String,
|
||||
pub progress: Option<f32>,
|
||||
pub message: Option<String>,
|
||||
pub is_cancellable: bool,
|
||||
}
|
||||
|
||||
/// A single line of output shown in the panel.
|
||||
|
||||
@@ -64,13 +64,6 @@ mod tests {
|
||||
assert_ne!(a.id, b.id);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn toast_levels() {
|
||||
let t = Toast::new(ToastLevel::Error, "oops".into());
|
||||
assert_eq!(t.level, ToastLevel::Error);
|
||||
assert!(!t.message.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fresh_toast_not_expired() {
|
||||
let t = Toast::new(ToastLevel::Info, "test".into());
|
||||
|
||||
Reference in New Issue
Block a user