Use matches!(..) to make TrieNode::is_empty more concise
This commit is contained in:
committed by
Chris Fallin
parent
66ba1d89b5
commit
5f5484ddbc
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user