Skip to content

Commit

Permalink
Improved pre-commit hook some more for easier use
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Roest committed Jun 11, 2019
1 parent 4c3aae4 commit c091b5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ SUCCESS="${GREEN}ok${RC}"

# Check if rustfmt is installed
printf "${PREFIX} Checking for rustfmt ... "
command -v cargo fmt &>/dev/null
if [[ $? == 0 ]]; then
OUT=$(cargo +stable fmt --version 2>&1 > /dev/null ) # Save the output of the command to OUT for later printing
if [[ $? -eq 0 ]]; then
printf "${SUCCESS}\n"
else
printf "${FAILURE}\n"
printf "${OUT}\n"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn verify_signature_openssl(
mod tests {
use crate::crypto::{
create_signature_openssl, verify_signature_ed25519, verify_signature_openssl, SizeError,
};
};
use openssl::bn::BigNum;
use rust_sodium::crypto::sign::ed25519;
use std::error::Error;
Expand Down

0 comments on commit c091b5e

Please sign in to comment.