Skip to content

Commit

Permalink
Merge pull request #20 from MiSArch/removed-unused-deps
Browse files Browse the repository at this point in the history
Removed unused dependencies
  • Loading branch information
legendofa authored Mar 21, 2024
2 parents 598f4e8 + 7563da3 commit 422c466
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ 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"
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"
Expand Down
2 changes: 1 addition & 1 deletion src/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProductVariant> =
db_client.collection::<ProductVariant>("product_variants");
Expand Down
17 changes: 2 additions & 15 deletions src/wishlist.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -91,16 +90,4 @@ impl From<Wishlist> for Uuid {
fn from(value: Wishlist) -> Self {
value._id
}
}

pub struct NodeWrapper<Node>(pub Node);

impl<Node> From<NodeWrapper<Node>> for Edge<uuid::Uuid, Node, EmptyFields>
where
Node: Into<uuid::Uuid> + OutputType + Clone,
{
fn from(value: NodeWrapper<Node>) -> Self {
let uuid = Into::<uuid::Uuid>::into(value.0.clone());
Edge::new(uuid, value.0)
}
}
}

0 comments on commit 422c466

Please sign in to comment.