diff options
| author | Igor Aleksanov <popzxc@yandex.ru> | 2020-01-07 10:35:16 +0300 |
|---|---|---|
| committer | Igor Aleksanov <popzxc@yandex.ru> | 2020-01-08 07:10:28 +0300 |
| commit | f720469fd0c4dff6d92e2f778ea2f252f76dcc2e (patch) | |
| tree | eed0768e1946a78b266025d661016f190795d871 /src/libstd/path.rs | |
| parent | aa0769b92e60f5298f0b6326b8654c9b04351b98 (diff) | |
| download | rust-f720469fd0c4dff6d92e2f778ea2f252f76dcc2e.tar.gz rust-f720469fd0c4dff6d92e2f778ea2f252f76dcc2e.zip | |
Use matches macro in libcore and libstd
Diffstat (limited to 'src/libstd/path.rs')
| -rw-r--r-- | src/libstd/path.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index f308d511cf8..fbbdc1ddac2 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -224,18 +224,12 @@ impl<'a> Prefix<'a> { #[stable(feature = "rust1", since = "1.0.0")] pub fn is_verbatim(&self) -> bool { use self::Prefix::*; - match *self { - Verbatim(_) | VerbatimDisk(_) | VerbatimUNC(..) => true, - _ => false, - } + matches!(*self, Verbatim(_) | VerbatimDisk(_) | VerbatimUNC(..)) } #[inline] fn is_drive(&self) -> bool { - match *self { - Prefix::Disk(_) => true, - _ => false, - } + matches!(*self, Prefix::Disk(_)) } #[inline] |
