Skip to content

Commit 7cc8d86

Browse files
committed
Clean up
1 parent 1d4f448 commit 7cc8d86

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

crates/common/src/signer/loader.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ impl SignerLoader {
5757
pub fn load_from_env(self) -> eyre::Result<Vec<ConsensusSigner>> {
5858
Ok(match self {
5959
SignerLoader::File { key_path } => {
60-
let path = load_env_var(SIGNER_KEYS_ENV).unwrap_or(
61-
key_path.to_str().ok_or_eyre("Missing signer key path")?.to_string(),
62-
);
60+
let path = load_env_var(SIGNER_KEYS_ENV).map(PathBuf::from).unwrap_or(key_path);
6361
let file = std::fs::read_to_string(path)
6462
.unwrap_or_else(|_| panic!("Unable to find keys file"));
6563

0 commit comments

Comments
 (0)