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)?;
|
Repository::init(repository_path)?;
|
||||||
let mut repository = Repository::open(repository_path)?;
|
let mut repository = Repository::open(repository_path)?;
|
||||||
let error = backup::Engine::new(repository_path, &mut repository).err().unwrap();
|
let error = backup::Engine::new(repository_path, &mut repository).err().unwrap();
|
||||||
let correct_error = match error {
|
let correct_error = matches!(error, BakareError::SourceSameAsRepository);
|
||||||
BakareError::SourceSameAsRepository => true,
|
|
||||||
_ => false,
|
|
||||||
};
|
|
||||||
assert!(correct_error);
|
assert!(correct_error);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue