fix liveview element
This commit is contained in:
1 parent
378cbfabd9
commit
2404bfeeb3
3 files changed
+7
-7
No files matched your search
@@ -26,7 +26,9 @@ fn main() {
|
||||
}
|
||||
}
|
||||
}"#;
|
||||
let mut interpreter = SLEDGEHAMMER_JS.replace("/*POST_HANDLE_EDITS*/", prevent_file_upload);
|
||||
let mut interpreter = SLEDGEHAMMER_JS
|
||||
.replace("/*POST_HANDLE_EDITS*/", prevent_file_upload)
|
||||
.replace("export", "");
|
||||
while let Some(import_start) = interpreter.find("import") {
|
||||
let import_end = interpreter[import_start..]
|
||||
.find(|c| c == ';' || c == '\n')
|
||||
|
||||
@@ -40,8 +40,9 @@ fn main() {
|
||||
return;
|
||||
}
|
||||
}"#;
|
||||
let mut interpreter =
|
||||
SLEDGEHAMMER_JS.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads);
|
||||
let mut interpreter = SLEDGEHAMMER_JS
|
||||
.replace("/*POST_EVENT_SERIALIZATION*/", serialize_file_uploads)
|
||||
.replace("export", "");
|
||||
while let Some(import_start) = interpreter.find("import") {
|
||||
let import_end = interpreter[import_start..]
|
||||
.find(|c| c == ';' || c == '\n')
|
||||
|
||||
@@ -169,10 +169,7 @@ pub(crate) struct Query<V: DeserializeOwned> {
|
||||
impl<V: DeserializeOwned> Query<V> {
|
||||
/// Resolve the query
|
||||
pub async fn resolve(mut self) -> Result<V, QueryError> {
|
||||
match self.receiver.recv().await {
|
||||
Some(result) => V::deserialize(result).map_err(QueryError::Deserialize),
|
||||
None => Err(QueryError::Recv(RecvError::Closed)),
|
||||
}
|
||||
V::deserialize(self.result().await?).map_err(QueryError::Deserialize)
|
||||
}
|
||||
|
||||
/// Send a message to the query
|
||||
|
||||
Reference in new issue
Block a user