Use matches!(..) to make TrieNode::is_empty more concise

This commit is contained in:
Nick Fitzgerald
2021-09-27 14:38:12 -07:00
committed by Chris Fallin
parent 66ba1d89b5
commit 5f5484ddbc

View File

@@ -234,10 +234,7 @@ enum TrieNode {
impl TrieNode {
fn is_empty(&self) -> bool {
match self {
&TrieNode::Empty => true,
_ => false,
}
matches!(self, &TrieNode::Empty)
}
fn insert(