[rust]: fix typo

This commit is contained in:
appflowy 2021-11-09 16:04:13 +08:00
parent f9ed746f9a
commit 38f498bb6a
4 changed files with 5 additions and 11 deletions

View File

@ -19,7 +19,7 @@ impl std::convert::From<i32> for ExportType {
1 => ExportType::RichText,
_ => {
log::error!("Invalid export type: {}", val);
ViewType::Text
ExportType::Text
},
}
}

View File

@ -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()?;

View File

@ -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!()
}

View File

@ -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());