Skip to content

Commit 9f3e12e

Browse files
committed
fmt
1 parent ccf58dd commit 9f3e12e

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

src/file_cache.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,9 @@ impl<T: AsyncFromStrWithState> FileCache<T> {
185185
#[async_trait(? Send)]
186186
pub trait AsyncFromStrWithState: Sized {
187187
/// Parses the string into an object.
188-
async fn from_str_with_state(app_state: &AppState, source: &str, source_path: &Path) -> anyhow::Result<Self>;
189-
}
188+
async fn from_str_with_state(
189+
app_state: &AppState,
190+
source: &str,
191+
source_path: &Path,
192+
) -> anyhow::Result<Self>;
193+
}

src/templates.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ pub fn split_template(mut original: Template) -> SplitTemplate {
5252

5353
#[async_trait(? Send)]
5454
impl AsyncFromStrWithState for SplitTemplate {
55-
async fn from_str_with_state(_app_state: &AppState, source: &str, source_path: &Path) -> anyhow::Result<Self> {
55+
async fn from_str_with_state(
56+
_app_state: &AppState,
57+
source: &str,
58+
source_path: &Path,
59+
) -> anyhow::Result<Self> {
5660
log::debug!("Compiling template {:?}", source_path);
5761
let tpl = Template::compile_with_name(source, "SQLPage component".to_string())?;
5862
Ok(split_template(tpl))

src/webserver/database/sql.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,22 @@ impl ParsedSqlFile {
4444

4545
fn from_err(e: impl Into<anyhow::Error>, source_path: &Path) -> Self {
4646
Self {
47-
statements: vec![ParsedStatement::Error(e.into().context(format!("While parsing file {source_path:?}")))],
47+
statements: vec![ParsedStatement::Error(
48+
e.into()
49+
.context(format!("While parsing file {source_path:?}")),
50+
)],
4851
source_path: source_path.to_path_buf(),
4952
}
5053
}
5154
}
5255

5356
#[async_trait(? Send)]
5457
impl AsyncFromStrWithState for ParsedSqlFile {
55-
async fn from_str_with_state(app_state: &AppState, source: &str, source_path: &Path) -> anyhow::Result<Self> {
58+
async fn from_str_with_state(
59+
app_state: &AppState,
60+
source: &str,
61+
source_path: &Path,
62+
) -> anyhow::Result<Self> {
5663
Ok(ParsedSqlFile::new(&app_state.db, source, source_path))
5764
}
5865
}

0 commit comments

Comments
 (0)