thank you clippy very cool

This commit is contained in:
LinlyBoi
2022-12-30 15:11:13 +02:00
parent 97822502c4
commit 8b6989f45e

View File

@@ -1,7 +1,7 @@
use actix_web::{
get,
http::header::ContentType,
web::{self, Json},
web::{self},
HttpResponse, Responder,
};
use backend::{
@@ -86,7 +86,7 @@ async fn api_test() -> impl Responder {
#[get("api/vehicle/{id}")]
async fn api_vehicle(id: web::Path<String>) -> impl Responder {
let id = id.into_inner();
let fetched_vehicle_data = get_vehicle(&mut establish_connection(), String::from(id));
let fetched_vehicle_data = get_vehicle(&mut establish_connection(), id);
HttpResponse::Ok()
.content_type(ContentType::plaintext())
.insert_header(("Access-Control-Allow-Origin", "*"))