hashes: Default to no_std
`hashes` is `no_std` ready, lets default to `no_std`.
This commit is contained in:
parent
6a4e219c55
commit
ba124757c4
|
@ -50,7 +50,7 @@
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![no_std]
|
||||||
// Experimental features we need.
|
// Experimental features we need.
|
||||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
#![cfg_attr(bench, feature(test))]
|
#![cfg_attr(bench, feature(test))]
|
||||||
|
@ -70,6 +70,9 @@ extern crate alloc;
|
||||||
|
|
||||||
extern crate core;
|
extern crate core;
|
||||||
|
|
||||||
|
#[cfg(feature = "std")]
|
||||||
|
extern crate std;
|
||||||
|
|
||||||
#[cfg(feature = "bitcoin-io")]
|
#[cfg(feature = "bitcoin-io")]
|
||||||
extern crate bitcoin_io as io;
|
extern crate bitcoin_io as io;
|
||||||
|
|
||||||
|
|
|
@ -491,10 +491,10 @@ impl HashEngine {
|
||||||
fn process_block(&mut self) {
|
fn process_block(&mut self) {
|
||||||
#[cfg(all(feature = "std", any(target_arch = "x86", target_arch = "x86_64")))]
|
#[cfg(all(feature = "std", any(target_arch = "x86", target_arch = "x86_64")))]
|
||||||
{
|
{
|
||||||
if is_x86_feature_detected!("sse4.1")
|
if std::is_x86_feature_detected!("sse4.1")
|
||||||
&& is_x86_feature_detected!("sha")
|
&& std::is_x86_feature_detected!("sha")
|
||||||
&& is_x86_feature_detected!("sse2")
|
&& std::is_x86_feature_detected!("sse2")
|
||||||
&& is_x86_feature_detected!("ssse3")
|
&& std::is_x86_feature_detected!("ssse3")
|
||||||
{
|
{
|
||||||
return unsafe { self.process_block_simd_x86_intrinsics() };
|
return unsafe { self.process_block_simd_x86_intrinsics() };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue