pub fn check_hash(&self) -> Result<ShaHash, Error> {
        let hash = self.get_hash().unwrap();
        let sha_check = read_file_to_string(self.file_path).unwrap();

        if sha_check == hash {
            Ok(ShaHash {
                hash,
                url: self.attached_artifact.url.to_string(),
            })
        } else {
            let message = format!(
                "Sha check mismatch {} : {} {}",
                self.attached_artifact.url, sha_check, hash
            );
            Result::Err(Error::new(ErrorKind::Other, message))
        }
    }
/// Checks if the hash contained in this file matches the hash of the attached artifact file.
Checks if the hash contained in this file matches the hash of the attached artifact file.
Checks if the hash contained in this file matches the hash of the attached artifact file .
pub fn check_hash(&self) -> Result<ShaHash, Error> {
        let hash = self.get_hash().unwrap();
        let sha_check = read_file_to_string(self.file_path).unwrap();
        if sha_check == hash {
            Ok(ShaHash {
                hash,
                url: self.attached_artifact.url.to_string(),
            })
        } else {
            let message = format!(
                "Sha check mismatch {} : {} {}",
                self.attached_artifact.url, sha_check, hash
            );
            Result::Err(Error::new(ErrorKind::Other, message))
        }
    }
pub fn check_hash ( & self ) -> Result < ShaHash , Error > { let hash = self . get_hash ( ) . unwrap ( ) ; let sha_check = read_file_to_string ( self . file_path ) . unwrap ( ) ; if sha_check == hash { Ok ( ShaHash { hash , url : self . attached_artifact . url . to_string ( ) , } ) } else { let message = format ! ( " " self attached_artifact url sha_check hash ) ; Result :: Err ( Error :: new ( ErrorKind :: Other , message ) ) } }
Checks if the hash contained in this file matches the hash of the attached artifact file.
Checks if the hash contained in this file matches the hash of the attached artifact file .
&self
&self