From 67985fbd0020e08cb34d7d19620dab6a222c8975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 7 Nov 2020 10:26:58 +0000 Subject: [PATCH] Simplify the match expression --- tests/system_tests.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/system_tests.rs b/tests/system_tests.rs index 9c5bb03..97e9405 100644 --- a/tests/system_tests.rs +++ b/tests/system_tests.rs @@ -123,10 +123,7 @@ fn forbid_backup_of_paths_within_repository() -> Result<(), BakareError> { Repository::init(repository_path)?; let mut repository = Repository::open(repository_path)?; let error = backup::Engine::new(repository_path, &mut repository).err().unwrap(); - let correct_error = match error { - BakareError::SourceSameAsRepository => true, - _ => false, - }; + let correct_error = matches!(error, BakareError::SourceSameAsRepository); assert!(correct_error); Ok(()) }