mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
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:
@ -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)]
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
Reference in New Issue
Block a user