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();