Skip to content

Commit

Permalink
fix clippy + fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed May 28, 2024
1 parent 10e3713 commit 657b916
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/sdk/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use core::fmt::Formatter;
use core::fmt::{Display, Formatter};
#[cfg(feature = "migrations")]
use core::str::FromStr;
use std::io::Read;
use std::marker::PhantomData;
use std::path::{Path, PathBuf};

Expand Down Expand Up @@ -401,9 +400,13 @@ where
}

fn validate(&self) -> eyre::Result<String> {
let update_json = std::fs::read_to_string(&self.path).map_err(|_| {
eyre!("Could not find or read updates file at the specified path.")
})?;
let update_json =
std::fs::read_to_string(&self.path).map_err(|_| {
eyre!(
"Could not find or read updates file at the specified \
path."
)
})?;
// validate contents against provided hash
if Hash::sha256(update_json.as_bytes()) != self.hash {
Err(eyre!(
Expand Down

0 comments on commit 657b916

Please sign in to comment.