Compare commits

..

No commits in common. "c8b5db719c0de550a22b87f88c34ac7c0489f78c" and "2e2795f9949016c18e4073bee30ebe4d34569da8" have entirely different histories.

1 changed files with 2 additions and 6 deletions

View File

@ -22,7 +22,7 @@ pub struct TreeView {
#[derive(Clone, Serialize, Deserialize)] #[derive(Clone, Serialize, Deserialize)]
struct TreeViewNode { struct TreeViewNode {
id: String, id: usize,
status: DiagnosticStatus, status: DiagnosticStatus,
children: Vec<TreeViewNode>, children: Vec<TreeViewNode>,
} }
@ -39,17 +39,13 @@ impl TreeView {
for child in children { for child in children {
let status = graph.value_of(&child)?; let status = graph.value_of(&child)?;
let node = TreeViewNode { let node = TreeViewNode {
id: graph.full_name_from_key(&child)?, id: child.clone(),
status: status, status: status,
children: Self::get_nodes(&child, &graph)?, children: Self::get_nodes(&child, &graph)?,
}; };
to_ret.push(node); to_ret.push(node);
} }
// Make the order of same id'd (named) entries consistent.
to_ret.sort_by(|a, b| a.id.cmp(&b.id));
return Ok(to_ret); return Ok(to_ret);
} }