Simplify the match expression
This commit is contained in:
parent
dd675bcbd5
commit
67985fbd00
1 changed files with 1 additions and 4 deletions
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue