fix: return type

This commit is contained in:
linonetwo
2023-01-13 00:30:08 +08:00
parent 3ab34de1e1
commit d9278fcc16
@@ -85,7 +85,7 @@ pub async fn update_y_document<'s>(
state: tauri::State<'s, AppState>,
parameters: YDocumentUpdate,
) -> Result<bool, String> {
if let Some(doc) = &state
if let Some(success) = &state
.0
.lock()
.await
@@ -94,7 +94,7 @@ pub async fn update_y_document<'s>(
.await
.ok()
{
Ok(true)
Ok(*success)
} else {
Err(format!("Failed to update yDoc to {}", parameters.id))
}