From 7563da351eb55ef26ecb5205a8128632fc10f863 Mon Sep 17 00:00:00 2001 From: st170001 Date: Fri, 22 Mar 2024 00:24:52 +0100 Subject: [PATCH] Removed unused dependencies --- Cargo.toml | 3 --- src/mutation.rs | 2 +- src/wishlist.rs | 17 ++--------------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b842ece..9624468 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,7 @@ edition = "2021" async-graphql = { version = "6.0.11", features = ["bson", "chrono", "uuid", "log"] } async-graphql-axum = "6.0.11" tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } -hyper = "1.0.1" axum = { version = "0.6.0", features = ["headers", "macros"] } -slab = "0.4.2" mongodb = "2.8.0" serde = "1.0.193" futures = "0.3.30" @@ -19,7 +17,6 @@ bson = "2.8.1" clap = { version = "4.4.13", features = ["derive"] } uuid = { version = "1.6.1", features = ["v4", "serde"] } mongodb-cursor-pagination = "0.3.2" -tonic = "0.8" json = "0.12.4" log = "0.4.20" simple_logger = "4.3.3" diff --git a/src/mutation.rs b/src/mutation.rs index af78088..7517868 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -172,7 +172,7 @@ async fn update_name( Ok(()) } -/// Checks if product variants and user in AddWishlistInput are in the system (MongoDB database populated with events). +/// Checks if product variants and user in CreateWishlistInput are in the system (MongoDB database populated with events). async fn validate_input(db_client: &Database, input: &CreateWishlistInput) -> Result<()> { let product_variant_collection: Collection = db_client.collection::("product_variants"); diff --git a/src/wishlist.rs b/src/wishlist.rs index 1a47194..9b844b7 100644 --- a/src/wishlist.rs +++ b/src/wishlist.rs @@ -1,8 +1,7 @@ use std::{cmp::Ordering, collections::HashSet}; use async_graphql::{ - connection::{Edge, EmptyFields}, - ComplexObject, OutputType, Result, SimpleObject, + ComplexObject, Result, SimpleObject, }; use bson::datetime::DateTime; use bson::Uuid; @@ -91,16 +90,4 @@ impl From for Uuid { fn from(value: Wishlist) -> Self { value._id } -} - -pub struct NodeWrapper(pub Node); - -impl From> for Edge -where - Node: Into + OutputType + Clone, -{ - fn from(value: NodeWrapper) -> Self { - let uuid = Into::::into(value.0.clone()); - Edge::new(uuid, value.0) - } -} +} \ No newline at end of file