Skip to content

Commit

Permalink
mark unused variables in endpoint methods
Browse files Browse the repository at this point in the history
  • Loading branch information
guscost committed Oct 13, 2018
1 parent a3803a9 commit 6e22d97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions example/src/endpoints/index.rs
Original file line number Diff line number Diff line change
@@ -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<Response, Error> {
fn get(&self, _context: &Processor, _request: Request) -> Result<Response, Error> {
return Ok(Response {
status: 200,
headers: HeaderMap::new(),
Expand Down
2 changes: 1 addition & 1 deletion example/src/endpoints/todo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Endpoint for TodoDetailEndpoint {
},
Err(_e) => {
return Ok(Response {
status: 200,
status: 400,
headers: HeaderMap::new(),
body: Bytes::from(hello!())
});
Expand Down
2 changes: 1 addition & 1 deletion example/src/endpoints/todos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endpoint!(TodoListEndpoint, todo_list);

impl Endpoint for TodoListEndpoint {

fn get(&self, context: &Processor, request: Request) -> Result<Response, Error> {
fn get(&self, context: &Processor, _request: Request) -> Result<Response, Error> {
use schema::todos::dsl::*;
use models::todo::*;
let conn: &PgConnection = &context.db.get().unwrap();
Expand Down

0 comments on commit 6e22d97

Please sign in to comment.