1
0
mirror of https://github.com/actix/examples synced 2025-06-28 09:50:36 +02:00

Fix/suppress warnings

This commit is contained in:
Yuki Okushi
2020-04-03 16:14:30 +09:00
parent 0f1568bd3c
commit 8f1c0a85cf
19 changed files with 29 additions and 32 deletions

View File

@ -2,18 +2,18 @@ use actix_web::{web, Error, HttpResponse};
use crate::common::{Part, Product};
pub async fn get_parts(query: web::Query<Option<Part>>) -> Result<HttpResponse, Error> {
pub async fn get_parts(_query: web::Query<Option<Part>>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn add_part(new_part: web::Json<Product>) -> Result<HttpResponse, Error> {
pub async fn add_part(_new_part: web::Json<Product>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn get_part_detail(id: web::Path<String>) -> Result<HttpResponse, Error> {
pub async fn get_part_detail(_id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn remove_part(id: web::Path<String>) -> Result<HttpResponse, Error> {
pub async fn remove_part(_id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}

View File

@ -3,22 +3,22 @@ use actix_web::{web, Error, HttpResponse};
use crate::common::{Part, Product};
pub async fn get_products(
query: web::Query<Option<Part>>,
_query: web::Query<Option<Part>>,
) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn add_product(
new_product: web::Json<Product>,
_new_product: web::Json<Product>,
) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn get_product_detail(id: web::Path<String>) -> Result<HttpResponse, Error> {
pub async fn get_product_detail(_id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}
pub async fn remove_product(id: web::Path<String>) -> Result<HttpResponse, Error> {
pub async fn remove_product(_id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
}