mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-16 13:48:26 +00:00
fix: don't panic while reading file in hotreload (#3142)
This commit is contained in:
parent
6216a26a40
commit
a35655a457
1 changed files with 7 additions and 1 deletions
|
@ -188,7 +188,13 @@ impl AppRunner {
|
|||
};
|
||||
|
||||
// And grabout the contents
|
||||
let contents = std::fs::read_to_string(&rust_file).unwrap();
|
||||
let Ok(contents) = std::fs::read_to_string(&rust_file) else {
|
||||
tracing::debug!(
|
||||
"Failed to read rust file while hotreloading: {:?}",
|
||||
rust_file
|
||||
);
|
||||
continue;
|
||||
};
|
||||
|
||||
match self.file_map.update_rsx::<HtmlCtx>(path, contents) {
|
||||
HotreloadResult::Rsx(new) => templates.extend(new),
|
||||
|
|
Loading…
Add table
Reference in a new issue