mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-21 03:57:39 +03:00
clippy
This commit is contained in:
parent
4164503f98
commit
bfa41e1d79
@ -21,13 +21,10 @@ pub mod unroller;
|
||||
pub use unroller::*;
|
||||
|
||||
pub mod unroll_expression;
|
||||
pub use unroll_expression::*;
|
||||
|
||||
pub mod unroll_program;
|
||||
pub use unroll_program::*;
|
||||
|
||||
pub mod unroll_statement;
|
||||
pub use unroll_statement::*;
|
||||
|
||||
use crate::{Pass, SymbolTable, TypeTable};
|
||||
|
||||
|
@ -48,7 +48,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
|
||||
fn visit_stub(&mut self, input: &'a Stub) {
|
||||
// Cannot have constant declarations in stubs.
|
||||
if !input.consts.is_empty() {
|
||||
self.emit_err(TypeCheckerError::stubs_cannot_have_const_declarations(input.consts.get(0).unwrap().1.span));
|
||||
self.emit_err(TypeCheckerError::stubs_cannot_have_const_declarations(input.consts.first().unwrap().1.span));
|
||||
}
|
||||
|
||||
// Typecheck the program's structs.
|
||||
|
@ -16,13 +16,9 @@
|
||||
|
||||
pub mod check_expressions;
|
||||
|
||||
pub use check_expressions::*;
|
||||
|
||||
pub mod check_program;
|
||||
pub use check_program::*;
|
||||
|
||||
pub mod check_statements;
|
||||
pub use check_statements::*;
|
||||
|
||||
pub mod checker;
|
||||
pub use checker::*;
|
||||
|
@ -25,7 +25,6 @@ pub use self::formatted::*;
|
||||
/// This module contains the macros for making errors easily.
|
||||
#[macro_use]
|
||||
pub mod macros;
|
||||
pub use self::macros::*;
|
||||
|
||||
/// This module contains traits for making errors easily.
|
||||
pub mod traits;
|
||||
|
@ -18,7 +18,6 @@ use super::*;
|
||||
use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer};
|
||||
use snarkvm::cli::helpers::dotenv_private_key;
|
||||
use std::path::PathBuf;
|
||||
use tracing_subscriber::fmt::time;
|
||||
|
||||
/// Deploys an Aleo program.
|
||||
#[derive(Parser, Debug)]
|
||||
|
@ -27,7 +27,7 @@ use retriever::LockFileEntry;
|
||||
use std::{
|
||||
env::current_dir,
|
||||
fs::File,
|
||||
io::{Read, Write},
|
||||
io::Write,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
@ -121,7 +121,7 @@ impl Context {
|
||||
}
|
||||
|
||||
let contents = std::fs::read_to_string(&lock_path)
|
||||
.map_err(|err| PackageError::failed_to_read_file(&lock_path.to_str().unwrap(), err))?;
|
||||
.map_err(|err| PackageError::failed_to_read_file(lock_path.to_str().unwrap(), err))?;
|
||||
|
||||
let entry_map: IndexMap<String, Vec<LockFileEntry>> =
|
||||
toml::from_str(&contents).map_err(PackageError::failed_to_deserialize_lock_file)?;
|
||||
@ -130,9 +130,8 @@ impl Context {
|
||||
|
||||
let list: Vec<(String, PathBuf)> = lock_entries
|
||||
.iter()
|
||||
.filter_map(|entry| match entry.path() {
|
||||
Some(local_path) => Some((entry.name().to_string(), local_path.clone().join("build"))),
|
||||
None => None,
|
||||
.filter_map(|entry| {
|
||||
entry.path().map(|local_path| (entry.name().to_string(), local_path.clone().join("build")))
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user