Skip to content

Commit

Permalink
chore: Remove imports already included by std::prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
jbencin committed Feb 27, 2024
1 parent ee1f7ed commit efafc49
Show file tree
Hide file tree
Showing 115 changed files with 6 additions and 164 deletions.
1 change: 0 additions & 1 deletion clarity/src/libclarity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pub use stacks_common::{
pub mod vm;

pub mod boot_util {
use std::convert::TryFrom;

use stacks_common::types::chainstate::StacksAddress;

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/analysis/type_checker/v2_05/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod contexts;
pub mod natives;

use std::collections::BTreeMap;
use std::convert::TryInto;

use hashbrown::HashMap;
use stacks_common::types::StacksEpochId;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_05/natives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;

use stacks_common::types::StacksEpochId;

use super::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

use stacks_common::types::StacksEpochId;

use super::{SimpleNativeFunction, TypedNativeFunction};
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_05/tests/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

use stacks_common::types::StacksEpochId;

use crate::vm::analysis::errors::CheckErrors;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_05/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

use stacks_common::types::StacksEpochId;

use crate::vm::analysis::errors::CheckErrors;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/analysis/type_checker/v2_1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pub mod contexts;
pub mod natives;

use std::collections::BTreeMap;
use std::convert::TryInto;

use hashbrown::HashMap;
use stacks_common::types::StacksEpochId;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_1/natives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;

use stacks_common::types::StacksEpochId;

use super::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

use stacks_common::types::StacksEpochId;

use super::{SimpleNativeFunction, TypedNativeFunction};
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_1/tests/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

#[cfg(test)]
use rstest::rstest;
#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;
use std::fs::read_to_string;

use assert_json_diff::assert_json_eq;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/analysis/type_checker/v2_1/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

#[cfg(test)]
use rstest::rstest;
#[cfg(test)]
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/ast/definition_sorter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::iter::FromIterator;

use hashbrown::{HashMap, HashSet};

use crate::vm::ast::errors::{ParseError, ParseErrors, ParseResult};
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/ast/parser/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::cmp;
use std::convert::TryInto;

use lazy_static::lazy_static;
use regex::{Captures, Regex};
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/ast/parser/v2/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod lexer;

use std::convert::TryFrom;
use std::num::ParseIntError;

use stacks_common::util::hash::hex_bytes;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/ast/sugar_expander/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

use hashbrown::{HashMap, HashSet};

use crate::vm::ast::errors::{ParseError, ParseErrors, ParseResult};
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/callables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::collections::BTreeMap;
use std::convert::TryInto;
use std::fmt;
use std::iter::FromIterator;

use stacks_common::types::StacksEpochId;

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::collections::{BTreeMap, BTreeSet};
use std::convert::TryInto;
use std::fmt;
use std::mem::replace;

Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

use stacks_common::types::StacksEpochId;

use crate::vm::ast::ContractAST;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/costs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};
use std::{cmp, fmt};

use hashbrown::HashMap;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/database/clarity_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

use serde_json;
use stacks_common::address::AddressHashMode;
use stacks_common::consts::{
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/database/clarity_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;
use std::path::PathBuf;

use rusqlite::Connection;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/database/key_value_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::clone::Clone;
use std::cmp::Eq;
use std::hash::Hash;

use hashbrown::HashMap;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/database/structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;
use std::io::Write;

use serde::Deserialize;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/docs/contracts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::BTreeMap;
use std::iter::FromIterator;

use hashbrown::{HashMap, HashSet};
use stacks_common::consts::CHAIN_ID_TESTNET;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/functions/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::cmp;
use std::convert::TryFrom;

use integer_sqrt::IntegerSquareRoot;

Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/functions/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

use stacks_common::types::StacksEpochId;

use crate::vm::costs::cost_functions::ClarityCostFunction;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/functions/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;

use stacks_common::codec::StacksMessageCodec;
use stacks_common::types::StacksEpochId;

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/functions/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::cmp;
use std::convert::{TryFrom, TryInto};

use stacks_common::types::chainstate::StacksBlockId;
use stacks_common::types::StacksEpochId;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/functions/principals.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::convert::TryFrom;

use stacks_common::address::{
C32_ADDRESS_VERSION_MAINNET_MULTISIG, C32_ADDRESS_VERSION_MAINNET_SINGLESIG,
C32_ADDRESS_VERSION_TESTNET_MULTISIG, C32_ADDRESS_VERSION_TESTNET_SINGLESIG,
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/functions/sequences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::cmp;
use std::convert::{TryFrom, TryInto};

use stacks_common::types::StacksEpochId;

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub mod test_util;
pub mod clarity;

use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};

use serde_json;
use stacks_common::types::StacksEpochId;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/representations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use std::borrow::Borrow;
use std::cmp::Ordering;
use std::convert::TryFrom;
use std::fmt;
use std::io::{Read, Write};
use std::ops::Deref;
Expand Down
4 changes: 1 addition & 3 deletions clarity/src/vm/tests/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

pub use crate::vm::analysis::errors::{CheckError, CheckErrors};
use crate::vm::execute_v2;
use crate::vm::types::SequenceSubtype::{BufferType, StringType};
use crate::vm::types::StringSubtype::ASCII;
use crate::vm::types::TypeSignature::SequenceType;
use crate::vm::types::{
ASCIIData, BuffData, BufferLength, CharType, SequenceData, TypeSignature, UTF8Data, Value,
};
use crate::vm::ClarityVersion;
use std::convert::TryFrom;
use crate::vm::{execute_v2, ClarityVersion};

#[test]
fn test_simple_buff_to_int_le() {
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/tests/datamaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{From, TryFrom};

use crate::vm::errors::{CheckErrors, Error, ShortReturnType};
use crate::vm::types::{
ListData, SequenceData, TupleData, TupleTypeSignature, TypeSignature, Value,
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/tests/sequences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::{TryFrom, TryInto};

use rstest::rstest;
use rstest_reuse::{self, *};
use stacks_common::types::StacksEpochId;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/tests/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryInto;

use stacks_common::types::StacksEpochId;

use super::MemoryEnvironmentGenerator;
Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub mod serialization;
pub mod signatures;

use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};
use std::{char, cmp, fmt, str};

use regex::Regex;
Expand Down
2 changes: 0 additions & 2 deletions clarity/src/vm/types/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::borrow::Borrow;
use std::convert::{TryFrom, TryInto};
use std::io::{Read, Write};
use std::{cmp, error, fmt, str};

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/types/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use std::collections::btree_map::Entry;
use std::collections::BTreeMap;
use std::convert::{TryFrom, TryInto};
use std::hash::{Hash, Hasher};
use std::{cmp, fmt};

Expand Down
1 change: 0 additions & 1 deletion clarity/src/vm/variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
use std::convert::TryFrom;

use super::errors::InterpreterError;
use crate::vm::contexts::{Environment, LocalContext};
Expand Down
2 changes: 0 additions & 2 deletions stacks-common/src/address/c32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;

use sha2::{Digest, Sha256};

use super::Error;
Expand Down
1 change: 0 additions & 1 deletion stacks-common/src/address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::convert::TryFrom;
use std::{error, fmt};

use sha2::{Digest, Sha256};
Expand Down
3 changes: 0 additions & 3 deletions stacks-common/src/deps_common/bitcoin/blockdata/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
//! single transaction
//!

use std::default::Default;

use crate::deps_common::bitcoin::blockdata::block::{Block, BlockHeader};
use crate::deps_common::bitcoin::blockdata::transaction::{OutPoint, Transaction, TxIn, TxOut};
use crate::deps_common::bitcoin::blockdata::{opcodes, script};
Expand Down Expand Up @@ -139,7 +137,6 @@ pub fn genesis_block(network: Network) -> Block {

#[cfg(test)]
mod test {
use std::default::Default;

use crate::deps_common::bitcoin::blockdata::constants::{
bitcoin_genesis_tx, genesis_block, COIN_VALUE, MAX_SEQUENCE,
Expand Down
1 change: 0 additions & 1 deletion stacks-common/src/deps_common/bitcoin/blockdata/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//! This module provides the structures and functions needed to support scripts.
//!

use std::default::Default;
use std::{error, fmt};

use serde;
Expand Down

0 comments on commit efafc49

Please sign in to comment.