use matches!() macro for simple if let conditions
This commit is contained in:
parent
2c69266c06
commit
40dddd3305
15 changed files with 33 additions and 36 deletions
|
@ -69,7 +69,7 @@ pub enum LibSource {
|
|||
|
||||
impl LibSource {
|
||||
pub fn is_some(&self) -> bool {
|
||||
if let LibSource::Some(_) = *self { true } else { false }
|
||||
matches!(self, LibSource::Some(_))
|
||||
}
|
||||
|
||||
pub fn option(&self) -> Option<PathBuf> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue