update clippy
This commit is contained in:
parent
870752d58d
commit
30a1abba8f
6 changed files with 22 additions and 22 deletions
|
@ -196,15 +196,15 @@ impl<T: Field> Decode<T> for CheckedValue<T> {
|
|||
match expected {
|
||||
ConcreteType::Int => unreachable!(),
|
||||
ConcreteType::FieldElement => CheckedValue::Field(raw.pop().unwrap()),
|
||||
ConcreteType::Uint(UBitwidth::B8) => CheckedValue::U8(
|
||||
u8::from_str_radix(&raw.pop().unwrap().to_dec_string(), 10).unwrap(),
|
||||
),
|
||||
ConcreteType::Uint(UBitwidth::B16) => CheckedValue::U16(
|
||||
u16::from_str_radix(&raw.pop().unwrap().to_dec_string(), 10).unwrap(),
|
||||
),
|
||||
ConcreteType::Uint(UBitwidth::B32) => CheckedValue::U32(
|
||||
u32::from_str_radix(&raw.pop().unwrap().to_dec_string(), 10).unwrap(),
|
||||
),
|
||||
ConcreteType::Uint(UBitwidth::B8) => {
|
||||
CheckedValue::U8(raw.pop().unwrap().to_dec_string().parse().unwrap())
|
||||
}
|
||||
ConcreteType::Uint(UBitwidth::B16) => {
|
||||
CheckedValue::U16(raw.pop().unwrap().to_dec_string().parse().unwrap())
|
||||
}
|
||||
ConcreteType::Uint(UBitwidth::B32) => {
|
||||
CheckedValue::U32(raw.pop().unwrap().to_dec_string().parse().unwrap())
|
||||
}
|
||||
ConcreteType::Boolean => {
|
||||
let v = raw.pop().unwrap();
|
||||
CheckedValue::Boolean(if v == 0.into() {
|
||||
|
|
|
@ -581,15 +581,15 @@ impl<'ast> From<pest::DecimalLiteralExpression<'ast>> for absy::ExpressionNode<'
|
|||
pest::DecimalSuffix::Field(_) => absy::Expression::FieldConstant(
|
||||
BigUint::parse_bytes(&expression.value.span.as_str().as_bytes(), 10).unwrap(),
|
||||
),
|
||||
pest::DecimalSuffix::U32(_) => absy::Expression::U32Constant(
|
||||
u32::from_str_radix(&expression.value.span.as_str(), 10).unwrap(),
|
||||
),
|
||||
pest::DecimalSuffix::U16(_) => absy::Expression::U16Constant(
|
||||
u16::from_str_radix(&expression.value.span.as_str(), 10).unwrap(),
|
||||
),
|
||||
pest::DecimalSuffix::U8(_) => absy::Expression::U8Constant(
|
||||
u8::from_str_radix(&expression.value.span.as_str(), 10).unwrap(),
|
||||
),
|
||||
pest::DecimalSuffix::U32(_) => {
|
||||
absy::Expression::U32Constant(expression.value.span.as_str().parse().unwrap())
|
||||
}
|
||||
pest::DecimalSuffix::U16(_) => {
|
||||
absy::Expression::U16Constant(expression.value.span.as_str().parse().unwrap())
|
||||
}
|
||||
pest::DecimalSuffix::U8(_) => {
|
||||
absy::Expression::U8Constant(expression.value.span.as_str().parse().unwrap())
|
||||
}
|
||||
}
|
||||
.span(expression.span),
|
||||
None => absy::Expression::IntConstant(
|
||||
|
|
|
@ -35,7 +35,7 @@ impl<T: fmt::Display> Node<T> {
|
|||
|
||||
pub trait NodeValue: fmt::Display + fmt::Debug + Sized + PartialEq {
|
||||
fn at(self, line: usize, col: usize, delta: isize) -> Node<Self> {
|
||||
let start = Position { col, line };
|
||||
let start = Position { line, col };
|
||||
Node::new(start, start.col(delta), self)
|
||||
}
|
||||
|
||||
|
|
|
@ -146,8 +146,8 @@ impl<T: Field> FlatStatement<T> {
|
|||
.collect();
|
||||
|
||||
FlatStatement::Directive(FlatDirective {
|
||||
outputs,
|
||||
inputs,
|
||||
outputs,
|
||||
..d
|
||||
})
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ impl<T: Field> From<FlatProg<T>> for Prog<T> {
|
|||
|
||||
let main = main.into();
|
||||
|
||||
Prog { private, main }
|
||||
Prog { main, private }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -946,7 +946,7 @@ pub mod signature {
|
|||
Constant::Concrete(s) => Ok(s.into()),
|
||||
}?;
|
||||
|
||||
GType::Array(GArrayType { ty, size })
|
||||
GType::Array(GArrayType { size, ty })
|
||||
}
|
||||
DeclarationType::FieldElement => GType::FieldElement,
|
||||
DeclarationType::Boolean => GType::Boolean,
|
||||
|
|
Loading…
Reference in a new issue