fix: return type

This commit is contained in:
linonetwo
2023-01-13 00:30:08 +08:00
parent 3ab34de1e1
commit d9278fcc16

View File

@@ -85,7 +85,7 @@ pub async fn update_y_document<'s>(
state: tauri::State<'s, AppState>, state: tauri::State<'s, AppState>,
parameters: YDocumentUpdate, parameters: YDocumentUpdate,
) -> Result<bool, String> { ) -> Result<bool, String> {
if let Some(doc) = &state if let Some(success) = &state
.0 .0
.lock() .lock()
.await .await
@@ -94,7 +94,7 @@ pub async fn update_y_document<'s>(
.await .await
.ok() .ok()
{ {
Ok(true) Ok(*success)
} else { } else {
Err(format!("Failed to update yDoc to {}", parameters.id)) Err(format!("Failed to update yDoc to {}", parameters.id))
} }