Skip to content

Commit 56bd2be

Browse files
committed
user tokio::fs to avoid blocking
1 parent 7350909 commit 56bd2be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

timeboost-contract/src/binaries/deploy.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ use alloy::{primitives::Address, providers::WalletProvider};
1616
use anyhow::{Context, Result};
1717
use clap::Parser;
1818
use serde::Serialize;
19-
use std::{fs, path::PathBuf};
19+
use std::path::PathBuf;
2020
use timeboost_contract::provider::build_provider;
2121
use timeboost_utils::types::logging;
22+
use tokio::fs;
2223
use tracing::info;
2324
use url::Url;
2425

@@ -100,7 +101,7 @@ async fn main() -> Result<()> {
100101
let toml = toml::to_string_pretty(&cfg)?;
101102

102103
if let Some(out) = &args.output {
103-
fs::write(out, &toml)?;
104+
fs::write(out, &toml).await?;
104105
info!(file=?out, "Config written to file");
105106
} else {
106107
println!("{toml}");

0 commit comments

Comments
 (0)