From 6e22d9717e2c1827e1e4fe5f839e03641e1cbb42 Mon Sep 17 00:00:00 2001 From: Gus Cost Date: Sat, 13 Oct 2018 16:43:42 -0400 Subject: [PATCH] mark unused variables in endpoint methods --- example/src/endpoints/index.rs | 3 +-- example/src/endpoints/todo.rs | 2 +- example/src/endpoints/todos.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/example/src/endpoints/index.rs b/example/src/endpoints/index.rs index a673e3e..a9ce8c9 100644 --- a/example/src/endpoints/index.rs +++ b/example/src/endpoints/index.rs @@ -1,14 +1,13 @@ use bytes::Bytes; use cosworth; use cosworth::prelude::*; -use diesel::prelude::*; pub struct IndexEndpoint {} endpoint!(IndexEndpoint, index); impl Endpoint for IndexEndpoint { - fn get(&self, context: &Processor, request: Request) -> Result { + fn get(&self, _context: &Processor, _request: Request) -> Result { return Ok(Response { status: 200, headers: HeaderMap::new(), diff --git a/example/src/endpoints/todo.rs b/example/src/endpoints/todo.rs index b20bfb8..5d2f53c 100644 --- a/example/src/endpoints/todo.rs +++ b/example/src/endpoints/todo.rs @@ -45,7 +45,7 @@ impl Endpoint for TodoDetailEndpoint { }, Err(_e) => { return Ok(Response { - status: 200, + status: 400, headers: HeaderMap::new(), body: Bytes::from(hello!()) }); diff --git a/example/src/endpoints/todos.rs b/example/src/endpoints/todos.rs index 1fd8442..e9a15da 100644 --- a/example/src/endpoints/todos.rs +++ b/example/src/endpoints/todos.rs @@ -13,7 +13,7 @@ endpoint!(TodoListEndpoint, todo_list); impl Endpoint for TodoListEndpoint { - fn get(&self, context: &Processor, request: Request) -> Result { + fn get(&self, context: &Processor, _request: Request) -> Result { use schema::todos::dsl::*; use models::todo::*; let conn: &PgConnection = &context.db.get().unwrap();