YTShortMakerArchx commited on
Commit
04d6660
·
verified ·
1 Parent(s): 7a6e037

Update models.rs

Browse files
Files changed (1) hide show
  1. models.rs +6 -17
models.rs CHANGED
@@ -49,17 +49,13 @@ impl JobStatus {
49
  JobStatus::Abandoned => "abandoned",
50
  }
51
  }
 
52
 
53
- pub fn from_str(s: &str) -> Option<Self> {
54
- match s {
55
- "queued" => Some(JobStatus::Queued),
56
- "running" => Some(JobStatus::Running),
57
- "completed" => Some(JobStatus::Completed),
58
- "failed" => Some(JobStatus::Failed),
59
- "abandoned" => Some(JobStatus::Abandoned),
60
- _ => None,
61
- }
62
- }
63
  }
64
 
65
  #[derive(Debug, Clone)]
@@ -78,13 +74,6 @@ pub struct Job {
78
  pub cleaned_text: String,
79
  }
80
 
81
- #[derive(Debug, Clone, Serialize, Deserialize)]
82
- pub struct WordTimestamp {
83
- pub word: String,
84
- pub start: f64,
85
- pub end: f64,
86
- }
87
-
88
  #[derive(Debug, Default)]
89
  pub struct Metrics {
90
  pub total_submitted: i32,
 
49
  JobStatus::Abandoned => "abandoned",
50
  }
51
  }
52
+ }
53
 
54
+ #[derive(Debug, Clone, Serialize, Deserialize)]
55
+ pub struct WordTimestamp {
56
+ pub word: String,
57
+ pub start: f64,
58
+ pub end: f64,
 
 
 
 
 
59
  }
60
 
61
  #[derive(Debug, Clone)]
 
74
  pub cleaned_text: String,
75
  }
76
 
 
 
 
 
 
 
 
77
  #[derive(Debug, Default)]
78
  pub struct Metrics {
79
  pub total_submitted: i32,