We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43467d0 commit f021008Copy full SHA for f021008
crates/bridge-exec/src/config.rs
@@ -2,7 +2,10 @@
2
//! the user running it.
3
4
use core::time;
5
-use std::{fs, io, path::PathBuf};
+use std::{
6
+ fs, io,
7
+ path::{Path, PathBuf},
8
+};
9
10
use alpen_express_primitives::l1::BitcoinAddress;
11
use bitcoin::Network;
@@ -39,7 +42,7 @@ pub struct AddressConfig {
39
42
40
43
impl Config {
41
44
/// Parse the config at the given path and produce the [`Config`].
- pub fn load_from_path(path: &PathBuf) -> InitResult<Self> {
45
+ pub fn load_from_path(path: impl AsRef<Path>) -> InitResult<Self> {
46
let contents = fs::read_to_string(path)?;
47
let config = toml::from_str::<Config>(contents.as_str())
48
.map_err(|e| SerdeError::new(contents, e))?;
0 commit comments