mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Fix/suppress warnings
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user