chore: upgrade rust version to 1.70 (#2749)

* chore: upgrade rust version to 1.70

* ci: fix wanrings

* ci: fix clippy warings
This commit is contained in:
Nathan.fooo
2023-06-09 22:23:07 +08:00
committed by GitHub
parent 133ac72317
commit ab5a3dae3c
57 changed files with 102 additions and 263 deletions

View File

@ -49,19 +49,14 @@ pub struct AppearanceSettingsPB {
const DEFAULT_RESET_VALUE: fn() -> bool = || APPEARANCE_RESET_AS_DEFAULT;
#[derive(ProtoBuf_Enum, Serialize, Deserialize, Clone, Debug)]
#[derive(ProtoBuf_Enum, Serialize, Deserialize, Clone, Debug, Default)]
pub enum ThemeModePB {
Light = 0,
Dark = 1,
#[default]
System = 2,
}
impl std::default::Default for ThemeModePB {
fn default() -> Self {
ThemeModePB::System
}
}
#[derive(ProtoBuf, Serialize, Deserialize, Debug, Clone)]
pub struct LocaleSettingsPB {
#[pb(index = 1)]

View File

@ -2,19 +2,14 @@ use flowy_derive::ProtoBuf_Enum;
use flowy_notification::NotificationBuilder;
const OBSERVABLE_CATEGORY: &str = "User";
#[derive(ProtoBuf_Enum, Debug)]
#[derive(ProtoBuf_Enum, Debug, Default)]
pub(crate) enum UserNotification {
#[default]
Unknown = 0,
DidUserSignIn = 1,
DidUpdateUserProfile = 2,
}
impl std::default::Default for UserNotification {
fn default() -> Self {
UserNotification::Unknown
}
}
impl std::convert::From<UserNotification> for i32 {
fn from(notification: UserNotification) -> Self {
notification as i32

View File

@ -177,7 +177,7 @@ impl UserSession {
let server = self.cloud_services.get_auth_service()?;
let token = session.token;
let _ = tokio::spawn(async move {
tokio::spawn(async move {
match server.sign_out(token).await {
Ok(_) => {},
Err(e) => tracing::error!("Sign out failed: {:?}", e),