Add and resolve an obscene amount of lints
This commit is contained in:
parent
b306f04664
commit
0d0627ba8f
5 changed files with 264 additions and 56 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use serde::{Serialize, Deserialize};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Default, PartialEq, Eq, Debug)]
|
||||
pub struct Graph {
|
||||
pub nodes: HashMap<String, Node>,
|
||||
|
|
@ -40,10 +41,7 @@ impl Graph {
|
|||
}
|
||||
|
||||
pub fn get_root(&self) -> Option<Node> {
|
||||
match self.nodes.get(&self.root_node) {
|
||||
Some(n) => Some(n.clone()),
|
||||
None => None,
|
||||
}
|
||||
self.nodes.get(&self.root_node).cloned()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue