mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
clippy
This commit is contained in:
parent
6ccb8ef6b2
commit
34a0b4e9b0
17
Cargo.lock
generated
17
Cargo.lock
generated
@ -1529,23 +1529,6 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leo-state"
|
||||
version = "1.5.3"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"leo-ast",
|
||||
"leo-errors",
|
||||
"leo-input",
|
||||
"rand 0.8.4",
|
||||
"rand_core 0.6.3",
|
||||
"rand_xorshift",
|
||||
"snarkvm-algorithms",
|
||||
"snarkvm-curves",
|
||||
"snarkvm-dpc",
|
||||
"snarkvm-utilities",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "leo-stdlib"
|
||||
version = "1.5.3"
|
||||
|
@ -38,7 +38,7 @@ members = [
|
||||
"linter",
|
||||
"package",
|
||||
"parser",
|
||||
"state",
|
||||
# "state",
|
||||
"stdlib",
|
||||
"synthesizer",
|
||||
"test-framework",
|
||||
|
@ -77,6 +77,7 @@ use leo_errors::Result;
|
||||
/// A new [`Asg`] can be created from an [`Ast`] generated in the `ast` module.
|
||||
#[derive(Clone)]
|
||||
pub struct Asg<'a> {
|
||||
#[allow(dead_code)] // todo: revisit this during asg refactor
|
||||
context: AsgContext<'a>,
|
||||
asg: Program<'a>,
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ use leo_errors::Span;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum AssigneeAccess {
|
||||
ArrayRange(Option<Expression>, Option<Expression>),
|
||||
|
@ -233,13 +233,9 @@ impl<F: PrimeField> CondSelectGadget<F> for Address {
|
||||
if let Boolean::Constant(cond) = *cond {
|
||||
Ok(cond_select_helper(first, second, cond))
|
||||
} else {
|
||||
let result_val = cond.get_value().and_then(|c| {
|
||||
if c {
|
||||
first.address.clone()
|
||||
} else {
|
||||
second.address.clone()
|
||||
}
|
||||
});
|
||||
let result_val = cond
|
||||
.get_value()
|
||||
.and_then(|c| if c { first.address } else { second.address });
|
||||
|
||||
let result = Self::alloc(cs.ns(|| "cond_select_result"), || {
|
||||
result_val.get().map(|v| v.to_string())
|
||||
|
@ -31,6 +31,7 @@ static START: Once = Once::new();
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Format<F = Full, T = SystemTime> {
|
||||
format: F,
|
||||
#[allow(dead_code)] // todo: revisit this after merging span module
|
||||
pub(crate) timer: T,
|
||||
pub(crate) ansi: bool,
|
||||
pub(crate) display_target: bool,
|
||||
|
@ -32,7 +32,7 @@ export interface LeoError { text: string, code: string, exitCode: number }
|
||||
/// Parse the code and return an AST as JSON or an error object.
|
||||
#[wasm_bindgen(method, catch)]
|
||||
pub fn parse(program: &str) -> Result<String, JsValue> {
|
||||
Ok(parse_program(program).map_err(error_to_value)?)
|
||||
parse_program(program).map_err(error_to_value)
|
||||
}
|
||||
|
||||
/// Parse the program and pass the Canonicalization phase;
|
||||
|
Loading…
Reference in New Issue
Block a user