miketang84 / sapper

A lightweight web framework built on hyper, implemented in Rust language.
MIT License
617 stars 46 forks source link

unused import & unused variables #8

Closed dumindu closed 8 years ago

dumindu commented 8 years ago

Just cloned the repository and run cargo build, get bellow errors on terminal(mac/Rust Nightly)

src/main.rs:7:60: 7:67 warning: unused import, #[warn(unused_imports)] on by default src/main.rs:7 use sapper::{SApp, SAppWrapper, Request, Response, Result, SModule}; ^~~~~~~ src/biz.rs:15:14: 15:17 warning: unused variable:req, #[warn(unused_variables)] on by default src/biz.rs:15 fn index(req: &mut Request) -> Result<Response> { ^~~ src/biz.rs:23:13: 23:16 warning: unused variable:req, #[warn(unused_variables)] on by default src/biz.rs:23 fn test(req: &mut Request) -> Result<Response> { ^~~ src/biz.rs:47:22: 47:25 warning: unused variable:req, #[warn(unused_variables)] on by default src/biz.rs:47 fn before(&self, req: &mut Request) -> Result<()> { ^~~ src/biz.rs:52:21: 52:24 warning: unused variable:req, #[warn(unused_variables)] on by default src/biz.rs:52 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~ src/biz.rs:52:36: 52:39 warning: unused variable:res, #[warn(unused_variables)] on by default src/biz.rs:52 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~ src/foo.rs:13:14: 13:17 warning: unused variable:req, #[warn(unused_variables)] on by default src/foo.rs:13 fn index(req: &mut Request) -> Result<Response> { ^~~ src/foo.rs:21:13: 21:16 warning: unused variable:req, #[warn(unused_variables)] on by default src/foo.rs:21 fn test(req: &mut Request) -> Result<Response> { ^~~ src/foo.rs:44:22: 44:25 warning: unused variable:req, #[warn(unused_variables)] on by default src/foo.rs:44 fn before(&self, req: &mut Request) -> Result<()> { ^~~ src/foo.rs:49:21: 49:24 warning: unused variable:req, #[warn(unused_variables)] on by default src/foo.rs:49 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~ src/foo.rs:49:36: 49:39 warning: unused variable:res, #[warn(unused_variables)] on by default src/foo.rs:49 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~ src/main.rs:21:22: 21:25 warning: unused variable:req, #[warn(unused_variables)] on by default src/main.rs:21 fn before(&self, req: &mut Request) -> Result<()> { ^~~ src/main.rs:27:21: 27:24 warning: unused variable:req, #[warn(unused_variables)] on by default src/main.rs:27 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~ src/main.rs:27:36: 27:39 warning: unused variable:res, #[warn(unused_variables)] on by default src/main.rs:27 fn after(&self, req: &Request, res: &mut Response) -> Result<()> { ^~~

miketang84 commented 8 years ago

ok, let me clean it.

miketang84 commented 8 years ago

done. compile it now.