Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

[rust]: fix typo

appflowy38f498bb6a66
diff --git a/rust-lib/flowy-workspace-infra/src/entities/share/export.rs b/rust-lib/flowy-workspace-infra/src/entities/share/export.rs
index 728e5e2dad..312558fc41 100644
--- a/rust-lib/flowy-workspace-infra/src/entities/share/export.rs
+++ b/rust-lib/flowy-workspace-infra/src/entities/share/export.rs
@@ -19,7 +19,7 @@ impl std::convert::From<i32> for ExportType {
1 => ExportType::RichText,
_ => {
log::error!("Invalid export type: {}", val);
- ViewType::Text
+ ExportType::Text
},
}
}
diff --git a/rust-lib/flowy-workspace/src/handlers/view_handler.rs b/rust-lib/flowy-workspace/src/handlers/view_handler.rs
index f9a46abf5d..d04ed77ee2 100644
--- a/rust-lib/flowy-workspace/src/handlers/view_handler.rs
+++ b/rust-lib/flowy-workspace/src/handlers/view_handler.rs
@@ -110,7 +110,7 @@ pub(crate) async fn duplicate_view_handler(
#[tracing::instrument(skip(data, controller), err)]
pub(crate) async fn export_handler(
- data: Data<QueryViewRequest>,
+ data: Data<ExportRequest>,
controller: Unit<Arc<ViewController>>,
) -> Result<(), WorkspaceError> {
let params: ExportParams = data.into_inner().try_into()?;
diff --git a/rust-lib/flowy-workspace/src/services/view_controller.rs b/rust-lib/flowy-workspace/src/services/view_controller.rs
index 82fdf3c6d1..b4438b1069 100644
--- a/rust-lib/flowy-workspace/src/services/view_controller.rs
+++ b/rust-lib/flowy-workspace/src/services/view_controller.rs
@@ -19,7 +19,7 @@ use crate::{
services::{server::Server, TrashCan, TrashEvent},
sql_tables::view::{ViewTable, ViewTableChangeset, ViewTableSql},
};
-use flowy_workspace_infra::entities::share::{ExportData, ExportParams, ExportRequest};
+use flowy_workspace_infra::entities::share::{ExportData, ExportParams};
pub(crate) struct ViewController {
user: Arc<dyn WorkspaceUser>,
@@ -140,7 +140,7 @@ impl ViewController {
}
#[tracing::instrument(level = "debug", skip(self, params), err)]
- pub(crate) async fn export_doc(&self, params: ExportParams) -> Result<ExportData, WorkspaceError> {
+ pub(crate) async fn export_doc(&self, _params: ExportParams) -> Result<ExportData, WorkspaceError> {
unimplemented!()
}
diff --git a/rust-lib/flowy-workspace/src/services/workspace_controller.rs b/rust-lib/flowy-workspace/src/services/workspace_controller.rs
index ceed90edc6..bd1c27fa13 100644
--- a/rust-lib/flowy-workspace/src/services/workspace_controller.rs
+++ b/rust-lib/flowy-workspace/src/services/workspace_controller.rs
@@ -14,13 +14,7 @@ use flowy_workspace_infra::{
};
use lazy_static::lazy_static;
use parking_lot::RwLock;
-use std::{
- collections::HashMap,
- sync::{
- atomic::{AtomicBool, Ordering},
- Arc,
- },
-};
+use std::{collections::HashMap, sync::Arc};
lazy_static! {
static ref INIT_WORKSPACE: RwLock<HashMap<String, bool>> = RwLock::new(HashMap::new());