Run cargo fmt.

This commit is contained in:
Paul Makles
2021-01-19 11:47:36 +00:00
parent 8cbba0671d
commit c38977e026
6 changed files with 18 additions and 24 deletions

View File

@@ -1,8 +1,6 @@
use crate::database::*;
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use crate::{
database::*,
notifications::{events::ClientboundNotification, hive},
};
use mongodb::bson::to_document;
use serde::{Deserialize, Serialize};

View File

@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use rauth::auth::Session;
use hive_pubsub::PubSub;
use rauth::auth::Session;
use serde::{Deserialize, Serialize};
use snafu::Snafu;
use super::hive::{get_hive, subscribe_if_exists};
@@ -95,19 +95,17 @@ pub fn prehandle_hook(notification: &ClientboundNotification) {
.unsubscribe(&user.to_string(), &id.to_string())
.ok();
}
ClientboundNotification::UserRelationship { id, user, status } => {
match status {
RelationshipStatus::None => {
get_hive()
.hive
.unsubscribe(&id.to_string(), &user.to_string())
.ok();
},
_ => {
subscribe_if_exists(id.clone(), user.clone()).ok();
}
ClientboundNotification::UserRelationship { id, user, status } => match status {
RelationshipStatus::None => {
get_hive()
.hive
.unsubscribe(&id.to_string(), &user.to_string())
.ok();
}
}
_ => {
subscribe_if_exists(id.clone(), user.clone()).ok();
}
},
_ => {}
}
}

View File

@@ -1,5 +1,5 @@
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;

View File

@@ -1,5 +1,5 @@
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;

View File

@@ -1,9 +1,8 @@
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
use hive_pubsub::PubSub;
use mongodb::bson::doc;
use rocket_contrib::json::JsonValue;

View File

@@ -1,9 +1,8 @@
use crate::database::*;
use crate::notifications::{events::ClientboundNotification, hive};
use crate::notifications::events::ClientboundNotification;
use crate::util::result::{Error, Result};
use futures::try_join;
use hive_pubsub::PubSub;
use mongodb::bson::doc;
use rocket_contrib::json::JsonValue;