fix autofmt: don't panic when writing blocks out without a srcfile (#2854)
* fix: don't panic when writing blocks out * also fix serialization for hotreload * fix windows line endings
This commit is contained in:
1 parent
b47a6cf83e
commit
4963aa3118
9 files changed
+142
-46
No files matched your search
@@ -51,8 +51,8 @@ impl NativeReceiver {
|
||||
match res {
|
||||
Ok(res) => match res {
|
||||
Message::Text(text) => {
|
||||
let leaked: &'static str = Box::leak(text.into_boxed_str());
|
||||
let msg = serde_json::from_str::<DevserverMsg>(leaked);
|
||||
// let leaked: &'static str = Box::leak(text.into_boxed_str());
|
||||
let msg = serde_json::from_str::<DevserverMsg>(&text);
|
||||
if let Ok(msg) = msg {
|
||||
return Some(Ok(msg));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user