Format fix

This commit is contained in:
microproofs 2024-09-20 13:52:09 -04:00
parent d3e95bd000
commit e8cf43d7ec
No known key found for this signature in database
GPG Key ID: 14F93C84DE6AFD17
1 changed files with 12 additions and 4 deletions

View File

@ -676,7 +676,9 @@ impl<'b> Decode<'b> for Constant {
de::Error::Message(format!("Failed to uncompress p1: {}", err)) de::Error::Message(format!("Failed to uncompress p1: {}", err))
})?; })?;
Err(de::Error::Message("BLS12-381 G1 points are not supported for flat decoding.".to_string())) Err(de::Error::Message(
"BLS12-381 G1 points are not supported for flat decoding.".to_string(),
))
} }
[10] => { [10] => {
@ -686,7 +688,9 @@ impl<'b> Decode<'b> for Constant {
de::Error::Message(format!("Failed to uncompress p2: {}", err)) de::Error::Message(format!("Failed to uncompress p2: {}", err))
})?; })?;
Err(de::Error::Message("BLS12-381 G2 points are not supported for flat decoding.".to_string())) Err(de::Error::Message(
"BLS12-381 G2 points are not supported for flat decoding.".to_string(),
))
} }
[11] => Err(de::Error::Message( [11] => Err(de::Error::Message(
"BLS12-381 ML results are not supported for flat decoding".to_string(), "BLS12-381 ML results are not supported for flat decoding".to_string(),
@ -736,7 +740,9 @@ fn decode_constant_value(typ: Rc<Type>, d: &mut Decoder) -> Result<Constant, de:
let _p1 = blst::blst_p1::uncompress(&p1) let _p1 = blst::blst_p1::uncompress(&p1)
.map_err(|err| de::Error::Message(format!("Failed to uncompress p1: {}", err)))?; .map_err(|err| de::Error::Message(format!("Failed to uncompress p1: {}", err)))?;
Err(de::Error::Message("BLS12-381 G1 points are not supported for flat decoding.".to_string())) Err(de::Error::Message(
"BLS12-381 G1 points are not supported for flat decoding.".to_string(),
))
} }
Type::Bls12_381G2Element => { Type::Bls12_381G2Element => {
let p2 = Vec::<u8>::decode(d)?; let p2 = Vec::<u8>::decode(d)?;
@ -744,7 +750,9 @@ fn decode_constant_value(typ: Rc<Type>, d: &mut Decoder) -> Result<Constant, de:
let _p2 = blst::blst_p2::uncompress(&p2) let _p2 = blst::blst_p2::uncompress(&p2)
.map_err(|err| de::Error::Message(format!("Failed to uncompress p2: {}", err)))?; .map_err(|err| de::Error::Message(format!("Failed to uncompress p2: {}", err)))?;
Err(de::Error::Message("BLS12-381 G2 points are not supported for flat decoding.".to_string())) Err(de::Error::Message(
"BLS12-381 G2 points are not supported for flat decoding.".to_string(),
))
} }
Type::Bls12_381MlResult => Err(de::Error::Message( Type::Bls12_381MlResult => Err(de::Error::Message(
"BLS12-381 ML results are not supported for flat decoding".to_string(), "BLS12-381 ML results are not supported for flat decoding".to_string(),