mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
don't panic if the formatting of the span is different than expected
This commit is contained in:
parent
d98821da47
commit
33af22638e
1 changed files with 2 additions and 5 deletions
|
@ -190,11 +190,8 @@ impl<'a, Ctx: HotReloadingContext> ToTokens for TemplateRenderer<'a, Ctx> {
|
||||||
let spndbg = format!("{:?}", self.roots[0].span());
|
let spndbg = format!("{:?}", self.roots[0].span());
|
||||||
let root_col = spndbg
|
let root_col = spndbg
|
||||||
.rsplit_once("..")
|
.rsplit_once("..")
|
||||||
.unwrap()
|
.and_then(|(_, after)| after.split_once(')').map(|(before, _)| before))
|
||||||
.1
|
.unwrap_or_default();
|
||||||
.split_once(')')
|
|
||||||
.unwrap()
|
|
||||||
.0;
|
|
||||||
|
|
||||||
// Render and release the mutable borrow on context
|
// Render and release the mutable borrow on context
|
||||||
let roots = quote! { #( #root_printer ),* };
|
let roots = quote! { #( #root_printer ),* };
|
||||||
|
|
Loading…
Reference in a new issue