Merge pull request #173 from AleoHQ/refactoring

Remove unnecessary logical statement
This commit is contained in:
Collin Chin 2020-08-05 11:38:13 -07:00 committed by GitHub
commit 8f37a9d788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,18 +121,13 @@ fn is_excluded(path: &Path) -> bool {
// excluded extensions: `.in`, `.bytes`, `lpk`, `lvk`, `.proof`, `.sum`
path.extension()
.map(|ext| {
if ext.eq(INPUT_FILE_EXTENSION.trim_start_matches("."))
ext.eq(INPUT_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(ZIP_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(PROVING_KEY_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(VERIFICATION_KEY_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(PROOF_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(CHECKSUM_FILE_EXTENSION.trim_start_matches("."))
| ext.eq(ZIP_FILE_EXTENSION.trim_start_matches("."))
{
true
} else {
false
}
})
.unwrap_or(false)
}