From e100e63f00cad10d27be1d1b0110a9e7e1bcfe4d Mon Sep 17 00:00:00 2001 From: Nia Calia-Bogan Date: Wed, 17 Nov 2021 17:16:13 -0500 Subject: [PATCH] Clear compiler warnings --- .../services/auth/oauth2_providers/discord.rs | 1 - .../services/auth/oauth2_providers/github.rs | 17 +++++++---------- src/web/services/auth/oauth2_providers/mod.rs | 1 - src/web/services/auth/rpi_cas.rs | 1 - src/web/services/meetings/create.rs | 1 - src/web/services/user/profile.rs | 2 +- src/web/services/user/register.rs | 7 +------ 7 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/web/services/auth/oauth2_providers/discord.rs b/src/web/services/auth/oauth2_providers/discord.rs index 45bffd03..b3c90170 100644 --- a/src/web/services/auth/oauth2_providers/discord.rs +++ b/src/web/services/auth/oauth2_providers/discord.rs @@ -1,6 +1,5 @@ //! Discord OAuth2 flow. -use crate::api::rcos::send_query; use crate::api::rcos::users::accounts::reverse_lookup::ReverseLookup; use crate::api::rcos::users::UserAccountType; use crate::env::global_config; diff --git a/src/web/services/auth/oauth2_providers/github.rs b/src/web/services/auth/oauth2_providers/github.rs index 44ad5277..37a5a74b 100644 --- a/src/web/services/auth/oauth2_providers/github.rs +++ b/src/web/services/auth/oauth2_providers/github.rs @@ -1,15 +1,12 @@ -use crate::api::rcos::users::accounts::reverse_lookup::ReverseLookup; -use crate::api::rcos::users::UserAccountType; -use crate::api::{ - github::{ - self, - users::authenticated_user::{ - authenticated_user::{AuthenticatedUserViewer, Variables}, - AuthenticatedUser, - }, +use crate::api::github::{ + self, + users::authenticated_user::{ + authenticated_user::{AuthenticatedUserViewer, Variables}, + AuthenticatedUser, }, - rcos, }; +use crate::api::rcos::users::accounts::reverse_lookup::ReverseLookup; +use crate::api::rcos::users::UserAccountType; use crate::env::global_config; use crate::error::TelescopeError; use crate::web::services::auth::identity::{AuthenticationCookie, RootIdentity}; diff --git a/src/web/services/auth/oauth2_providers/mod.rs b/src/web/services/auth/oauth2_providers/mod.rs index 49bb4680..d71a1628 100644 --- a/src/web/services/auth/oauth2_providers/mod.rs +++ b/src/web/services/auth/oauth2_providers/mod.rs @@ -4,7 +4,6 @@ use crate::api::rcos::users::accounts::link::LinkUserAccount; use crate::api::rcos::users::accounts::reverse_lookup::ReverseLookup; use crate::api::rcos::users::accounts::unlink::UnlinkUserAccount; use crate::api::rcos::users::UserAccountType; -use crate::api::rcos::{send_query, users::accounts::reverse_lookup}; use crate::error::TelescopeError; use crate::web::csrf; use crate::web::services::auth::identity::{AuthenticationCookie, Identity, RootIdentity}; diff --git a/src/web/services/auth/rpi_cas.rs b/src/web/services/auth/rpi_cas.rs index d10f7e64..fa9da650 100644 --- a/src/web/services/auth/rpi_cas.rs +++ b/src/web/services/auth/rpi_cas.rs @@ -2,7 +2,6 @@ //! [here](https://apereo.github.io/cas/4.2.x/protocol/CAS-Protocol.html) //! and work from RPI students who came before me. -use crate::api::rcos::send_query; use crate::api::rcos::users::accounts::link::LinkUserAccount; use crate::api::rcos::users::accounts::lookup::AccountLookup; use crate::api::rcos::users::accounts::reverse_lookup::ReverseLookup; diff --git a/src/web/services/meetings/create.rs b/src/web/services/meetings/create.rs index 59767b7c..3bd97c7f 100644 --- a/src/web/services/meetings/create.rs +++ b/src/web/services/meetings/create.rs @@ -6,7 +6,6 @@ //! to finish meeting creation. use crate::api::rcos::meetings::authorization_for::UserMeetingAuthorization; -use crate::api::rcos::meetings::creation; use crate::api::rcos::meetings::creation::context::CreationContext; use crate::api::rcos::meetings::creation::create::CreateMeeting; use crate::api::rcos::meetings::creation::host_selection::HostSelection; diff --git a/src/web/services/user/profile.rs b/src/web/services/user/profile.rs index cd9723b3..34368f66 100644 --- a/src/web/services/user/profile.rs +++ b/src/web/services/user/profile.rs @@ -13,7 +13,7 @@ use crate::templates::forms::FormTemplate; use crate::templates::Template; use crate::web::services::auth::identity::{AuthenticationCookie, Identity}; -use actix_web::web::{Form, Path, Query, ServiceConfig}; +use actix_web::web::{Form, Path, ServiceConfig}; use actix_web::{http::header::LOCATION, HttpRequest, HttpResponse}; use chrono::{Datelike, Local}; use serenity::model::guild::Member; diff --git a/src/web/services/user/register.rs b/src/web/services/user/register.rs index d0c0cbf1..cb8ecdfe 100644 --- a/src/web/services/user/register.rs +++ b/src/web/services/user/register.rs @@ -1,8 +1,4 @@ -use crate::api::github::users::authenticated_user::authenticated_user::AuthenticatedUserViewer; -use crate::api::rcos::send_query; -use crate::api::rcos::users::create::{ - create_one_user::Variables as CreateOneUserVariables, CreateOneUser, -}; +use crate::api::rcos::users::create::CreateOneUser; use crate::api::rcos::users::{UserAccountType, UserRole}; use crate::error::TelescopeError; use crate::templates::forms::FormTemplate; @@ -13,7 +9,6 @@ use crate::web::services::auth::rpi_cas::RpiCasIdentity; use actix_web::http::header::LOCATION; use actix_web::web::Form; use actix_web::{HttpRequest, HttpResponse, Responder}; -use serenity::model::user::CurrentUser; use uuid::Uuid; /// The path from the templates directory to the registration template.