Clippy fix
This commit is contained in:
parent
4f1de2d3b5
commit
eb37ed0da5
|
@ -676,9 +676,7 @@ 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(format!(
|
Err(de::Error::Message("BLS12-381 G1 points are not supported for flat decoding.".to_string()))
|
||||||
"BLS12-381 G1 points are not supported for flat decoding."
|
|
||||||
)))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[10] => {
|
[10] => {
|
||||||
|
@ -688,9 +686,7 @@ 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(format!(
|
Err(de::Error::Message("BLS12-381 G2 points are not supported for flat decoding.".to_string()))
|
||||||
"BLS12-381 G2 points are not supported for flat decoding."
|
|
||||||
)))
|
|
||||||
}
|
}
|
||||||
[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(),
|
||||||
|
@ -740,9 +736,7 @@ 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(format!(
|
Err(de::Error::Message("BLS12-381 G1 points are not supported for flat decoding.".to_string()))
|
||||||
"BLS12-381 G1 points are not supported for flat decoding."
|
|
||||||
)))
|
|
||||||
}
|
}
|
||||||
Type::Bls12_381G2Element => {
|
Type::Bls12_381G2Element => {
|
||||||
let p2 = Vec::<u8>::decode(d)?;
|
let p2 = Vec::<u8>::decode(d)?;
|
||||||
|
@ -750,9 +744,7 @@ 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(format!(
|
Err(de::Error::Message("BLS12-381 G2 points are not supported for flat decoding.".to_string()))
|
||||||
"BLS12-381 G2 points are not supported for flat decoding."
|
|
||||||
)))
|
|
||||||
}
|
}
|
||||||
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(),
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ impl Program<Name> {
|
||||||
{
|
{
|
||||||
*term = Term::var(format!("blst_p1_index_{}", index));
|
*term = Term::var(format!("blst_p1_index_{}", index));
|
||||||
} else {
|
} else {
|
||||||
blst_p1_list.push(blst_p1.as_ref().clone());
|
blst_p1_list.push(*blst_p1.as_ref());
|
||||||
*term = Term::var(format!("blst_p1_index_{}", blst_p1_list.len() - 1));
|
*term = Term::var(format!("blst_p1_index_{}", blst_p1_list.len() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1163,7 +1163,7 @@ impl Program<Name> {
|
||||||
{
|
{
|
||||||
*term = Term::var(format!("blst_p2_index_{}", index));
|
*term = Term::var(format!("blst_p2_index_{}", index));
|
||||||
} else {
|
} else {
|
||||||
blst_p2_list.push(blst_p2.as_ref().clone());
|
blst_p2_list.push(*blst_p2.as_ref());
|
||||||
*term = Term::var(format!("blst_p2_index_{}", blst_p2_list.len() - 1));
|
*term = Term::var(format!("blst_p2_index_{}", blst_p2_list.len() - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue