File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -185,5 +185,9 @@ impl<T: AsyncFromStrWithState> FileCache<T> {
185185#[ async_trait( ? Send ) ]
186186pub 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+ }
Original file line number Diff line number Diff line change @@ -52,7 +52,11 @@ pub fn split_template(mut original: Template) -> SplitTemplate {
5252
5353#[ async_trait( ? Send ) ]
5454impl 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) )
Original file line number Diff line number Diff 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 ) ]
5457impl 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}
You can’t perform that action at this time.
0 commit comments