|
@@ -168,11 +168,14 @@ impl Case {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- pub fn variants_stat(&self) -> Option<Vec<Stat>> {
|
|
|
|
|
|
|
+ pub fn variants_stat(&self) -> Option<CaseStats> {
|
|
|
match &self.variants {
|
|
match &self.variants {
|
|
|
Some(v) => {
|
|
Some(v) => {
|
|
|
- if let std::result::Result::Ok(res) = v.stats() {
|
|
|
|
|
- Some(res)
|
|
|
|
|
|
|
+ if let std::result::Result::Ok(stats) = v.stats() {
|
|
|
|
|
+ Some(CaseStats {
|
|
|
|
|
+ id: self.id.to_string(),
|
|
|
|
|
+ stats,
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
None
|
|
None
|
|
|
}
|
|
}
|
|
@@ -182,6 +185,12 @@ impl Case {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Serialize)]
|
|
|
|
|
+pub struct CaseStats {
|
|
|
|
|
+ id: String,
|
|
|
|
|
+ stats: Vec<Stat>
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
pub struct DiffSnp {
|
|
pub struct DiffSnp {
|
|
|
lines: Vec<String>,
|
|
lines: Vec<String>,
|
|
|
}
|
|
}
|