feat: add no-std support

closes #5
This commit is contained in:
Victor Lopez
2022-11-22 13:35:27 +01:00
parent 7395697a68
commit 3b9d515d00
7 changed files with 60 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
use super::DIGEST_SIZE;
use crate::{
ByteReader, ByteWriter, Deserializable, DeserializationError, Digest, Felt, Serializable,
StarkField, ZERO,
StarkField, String, ZERO,
};
use core::ops::Deref;
@@ -59,9 +59,9 @@ impl Deserializable for RpoDigest256 {
for inner in inner.iter_mut() {
let e = source.read_u64()?;
if e >= Felt::MODULUS {
return Err(DeserializationError::InvalidValue(
"Value not in the appropriate range".to_owned(),
));
return Err(DeserializationError::InvalidValue(String::from(
"Value not in the appropriate range",
)));
}
*inner = Felt::new(e);
}