Skip to content

Commit ad09282

Browse files
author
Stephan Dilly
committed
deny panics
1 parent 4c17660 commit ad09282

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

asyncgit/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![forbid(missing_docs)]
55
#![deny(clippy::all)]
66
#![deny(clippy::result_unwrap_used)]
7+
#![deny(clippy::panic)]
78

89
mod diff;
910
mod error;

asyncgit/src/sync/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn repo(repo_path: &str) -> Result<Repository> {
2424
)?;
2525

2626
if repo.is_bare() {
27-
panic!("bare repo")
27+
return Err(Error::Generic("bare repo".to_string()));
2828
}
2929

3030
Ok(repo)

0 commit comments

Comments
 (0)