Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Feb 23, 2024
1 parent 7443c13 commit 9af125d
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 18 deletions.
1 change: 0 additions & 1 deletion chia-bls/fuzz/fuzz_targets/blspy-fidelity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use pyo3::prelude::*;
use std::convert::TryFrom;

use chia_bls::derivable_key::DerivableKey;
use chia_bls::secret_key::SecretKey;
Expand Down
1 change: 0 additions & 1 deletion chia-bls/src/mnemonic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use anyhow::Error;
use bip39::{Language, Mnemonic, Seed};
use std::array::TryFromSliceError;
use std::result::Result;

pub fn entropy_to_mnemonic(entropy: &[u8; 32]) -> String {
Mnemonic::from_entropy(entropy, Language::English)
Expand Down
1 change: 0 additions & 1 deletion chia-bls/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use blst::*;
use chia_traits::{read_bytes, Streamable};
use sha2::{Digest, Sha256};
use std::borrow::Borrow;
use std::convert::AsRef;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::io::Cursor;
Expand Down
1 change: 0 additions & 1 deletion chia-protocol/fuzz/fuzz_targets/spend-bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use clvmr::ENABLE_FIXED_DIV;
use clvmr::{Allocator, NodePtr};
use libfuzzer_sys::fuzz_target;
use std::collections::HashSet;
use std::iter::FromIterator;

fuzz_target!(|data: &[u8]| {
let Ok(bundle) = SpendBundle::from_bytes(data) else {
Expand Down
1 change: 0 additions & 1 deletion chia-protocol/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use chia_traits::{chia_error, read_bytes, Streamable};
use clvm_traits::{ClvmDecoder, ClvmEncoder, FromClvm, FromClvmError, ToClvm, ToClvmError};
use sha2::{Digest, Sha256};
use std::array::TryFromSliceError;
use std::convert::{AsRef, TryInto};
use std::fmt;
use std::io::Cursor;
use std::ops::Deref;
Expand Down
1 change: 0 additions & 1 deletion chia-protocol/src/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use clvm_traits::{
ToClvm, ToClvmError,
};
use sha2::{Digest, Sha256};
use std::convert::TryInto;

#[cfg(feature = "py-bindings")]
use pyo3::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion chia-protocol/src/spend_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use clvmr::cost::Cost;
use clvmr::op_utils::{first, rest};
use clvmr::reduction::EvalErr;
use clvmr::Allocator;
use std::result::Result;

#[cfg(feature = "py-bindings")]
use pyo3::prelude::*;
Expand Down
5 changes: 2 additions & 3 deletions chia-traits/src/int.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use pyo3::prelude::*;
use pyo3::types::{PyAny, PyBool, PyList, PyString, PyTuple};
use pyo3::PyResult;
use pyo3::types::{PyAny, PyBool, PyList, PyModule, PyString, PyTuple};
use pyo3::{IntoPy, PyResult, Python};

/// A custom to-python conversion trait that turns primitive integer types into
/// the chia-blockchain fixed-width integer types (uint8, int8, etc.)
Expand Down
1 change: 0 additions & 1 deletion chia-traits/src/streamable.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::chia_error::{Error, Result};
use sha2::{Digest, Sha256};
use std::convert::TryInto;
use std::io::Cursor;
use std::mem::size_of;

Expand Down
1 change: 0 additions & 1 deletion src/gen/get_puzzle_and_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use ::chia_protocol::bytes::Bytes32;
use clvm_utils::tree_hash;
use clvmr::allocator::{Allocator, Atom, NodePtr};
use clvmr::op_utils::u64_from_bytes;
use std::convert::AsRef;

// returns parent-coin ID, amount, puzzle-reveal and solution
pub fn parse_coin_spend(
Expand Down
5 changes: 1 addition & 4 deletions wheel/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ use clvmr::{ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, LIMIT_HEAP, NO_UNKNO
use pyo3::buffer::PyBuffer;
use pyo3::exceptions::PyRuntimeError;
use pyo3::prelude::*;
use pyo3::types::PyAny;
use pyo3::types::PyBytes;
use pyo3::types::PyList;
use pyo3::types::PyModule;
use pyo3::types::PyTuple;
use pyo3::{wrap_pyfunction, PyResult, Python};
use std::convert::TryInto;
use pyo3::wrap_pyfunction;
use std::iter::zip;

use crate::run_program::{run_chia_program, serialized_length};
Expand Down
2 changes: 0 additions & 2 deletions wheel/src/compression.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use chia::compression::compressor::create_autoextracting_clvm_program;
use pyo3::prelude::*;
use pyo3::types::PyBytes;
use pyo3::types::PyModule;
use pyo3::{wrap_pyfunction, PyResult, Python};

#[pyfunction]
fn create_compressed_generator<'p>(py: Python<'p>, input_program: &[u8]) -> PyResult<&'p PyBytes> {
Expand Down

0 comments on commit 9af125d

Please sign in to comment.