build(deps): update rust-toolchain to 1.67 and bump uuid to 1.4

some of the dependency updates are requiring a higher version of the
rust toolchain. bump to 1.67 and fix new clippy lints.

also fix dprint to 0.39.1 because 0.40 has breaking changes.
This commit is contained in:
Byron Hambly 2023-07-31 10:32:15 +02:00
parent 0dbdf51e6d
commit acdba8474b
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
12 changed files with 41 additions and 29 deletions

View file

@ -64,7 +64,7 @@ tracing-appender = "0.2"
tracing-futures = { version = "0.2", features = [ "std-future", "futures-03" ] }
tracing-subscriber = { version = "0.3", default-features = false, features = [ "fmt", "ansi", "env-filter", "time", "tracing-log", "json" ] }
url = { version = "2", features = [ "serde" ] }
uuid = { version = "1.3", features = [ "serde", "v4" ] }
uuid = { version = "1.4", features = [ "serde", "v4" ] }
void = "1"
[target.'cfg(not(windows))'.dependencies]

View file

@ -54,7 +54,7 @@ impl Wallet {
) -> Result<Self> {
let data_dir = data_dir.as_ref();
let wallet_dir = data_dir.join(WALLET);
let database = bdk::sled::open(&wallet_dir)?.open_tree(SLED_TREE_NAME)?;
let database = bdk::sled::open(wallet_dir)?.open_tree(SLED_TREE_NAME)?;
let network = env_config.bitcoin_network;
let wallet = match bdk::Wallet::new(
@ -97,7 +97,7 @@ impl Wallet {
std::fs::rename(from, to)?;
let wallet_dir = data_dir.join(WALLET);
let database = bdk::sled::open(&wallet_dir)?.open_tree(SLED_TREE_NAME)?;
let database = bdk::sled::open(wallet_dir)?.open_tree(SLED_TREE_NAME)?;
let wallet = bdk::Wallet::new(
bdk::template::Bip84(xprivkey, KeychainKind::External),
@ -738,12 +738,15 @@ impl Client {
let client = bdk::electrum_client::Client::new(electrum_rpc_url.as_str())
.context("Failed to initialize Electrum RPC client")?;
let blockchain = ElectrumBlockchain::from(client);
let last_sync = Instant::now()
.checked_sub(interval)
.expect("no underflow since block time is only 600 secs");
Ok(Self {
electrum,
blockchain,
latest_block_height: BlockHeight::try_from(latest_block)?,
last_sync: Instant::now() - interval,
last_sync,
sync_interval: interval,
script_history: Default::default(),
subscriptions: Default::default(),

View file

@ -21,7 +21,7 @@ struct GlobalSpawnTokioExecutor;
impl Executor for GlobalSpawnTokioExecutor {
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>) {
let _ = tokio::spawn(future);
tokio::spawn(future);
}
}

View file

@ -61,7 +61,7 @@ impl Seed {
let file_path = Path::new(&file_path_buf);
if file_path.exists() {
return Self::from_file(&file_path);
return Self::from_file(file_path);
}
tracing::debug!("No seed file found, creating at {}", file_path.display());

View file

@ -8,7 +8,7 @@ async fn ensure_same_swap_id_for_alice_and_bob() {
harness::setup_test(SlowCancelConfig, |mut ctx| async move {
let (bob_swap, _) = ctx.bob_swap().await;
let bob_swap_id = bob_swap.id;
let _ = tokio::spawn(bob::run(bob_swap));
tokio::spawn(bob::run(bob_swap));
// once Bob's swap is spawned we can retrieve Alice's swap and assert on the
// swap ID

View file

@ -928,7 +928,7 @@ async fn init_bitcoind(node_url: Url, spendable_quantity: u32) -> Result<Client>
bitcoind_client
.generatetoaddress(101 + spendable_quantity, reward_address.clone())
.await?;
let _ = tokio::spawn(mine(bitcoind_client.clone(), reward_address));
tokio::spawn(mine(bitcoind_client.clone(), reward_address));
Ok(bitcoind_client)
}