Skip to content

integration_test: Enable edition 2018 #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "integration_tests_miniscript"
version = "0.1.0"
authors = ["Steven Roose <[email protected]>", "Sanket K <[email protected]>"]
edition = "2018"

[dependencies]
miniscript = {path = "../"}
Expand Down
10 changes: 2 additions & 8 deletions integration_test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
//!
//! This is how some external user would use rust-miniscript

extern crate bitcoincore_rpc;
extern crate log;

extern crate bitcoin;
extern crate miniscript;

use bitcoincore_rpc::{Auth, Client, RpcApi};

mod test_cpp;
Expand All @@ -18,11 +12,11 @@ use crate::test_util::TestData;
struct StdLogger;

impl log::Log for StdLogger {
fn enabled(&self, metadata: &log::Metadata) -> bool {
fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
metadata.target().contains("jsonrpc") || metadata.target().contains("bitcoincore_rpc")
}

fn log(&self, record: &log::Record) {
fn log(&self, record: &log::Record<'_>) {
if self.enabled(record.metadata()) {
println!(
"[{}][{}]: {}",
Expand Down
5 changes: 1 addition & 4 deletions integration_test/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
//! The keys/hashes are automatically translated so that the tests knows how to satisfy things that don't end with !
//!

extern crate rand;

use self::rand::RngCore;
use bitcoin::hashes::{hex::ToHex, Hash};
use miniscript::descriptor::{SinglePub, SinglePubKey};
use miniscript::{Descriptor, DescriptorPublicKey, Miniscript, ScriptContext, TranslatePk};
use rand::RngCore;
use std::str::FromStr;

use bitcoin;
use bitcoin::hashes::{hash160, ripemd160, sha256, sha256d};
use bitcoin::secp256k1;

Expand Down