diff --git a/hooks/pre-commit b/hooks/pre-commit index dbf281a9..ec5b30dd 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -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 diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 65f3f58d..788dd1b7 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -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;