deny panics

This commit is contained in:
Stephan Dilly 2020-05-23 17:17:39 +02:00
parent 4c17660956
commit ad092823ff
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@
#![forbid(missing_docs)]
#![deny(clippy::all)]
#![deny(clippy::result_unwrap_used)]
#![deny(clippy::panic)]
mod diff;
mod error;

View file

@ -24,7 +24,7 @@ pub fn repo(repo_path: &str) -> Result<Repository> {
)?;
if repo.is_bare() {
panic!("bare repo")
return Err(Error::Generic("bare repo".to_string()));
}
Ok(repo)