Repository: graphql-rust/juniper (language: rust)

Issue:
Clean up Clippy warnings + remove try!
Right now, there are a lot of clippy warnings in the codebase.

Most of them are sensible suggestions and should be fixed.

Also, we should remove `try!` and replace it with   `?` everywhere.

Instructions:

```bash
rustup install nightly
rustup default nightly
cargo install clippy

cd juniper
cargo clippy
```

This is an easy task and help is very welcome.
@LegNeato 



Discussion / hints:
I am working on this.

Fix patch:
diff --git a/juniper/src/ast.rs b/juniper/src/ast.rs
index 8d5c0ae93..45547ff44 100644
--- a/juniper/src/ast.rs
+++ b/juniper/src/ast.rs
@@ -432,25 +432,25 @@ impl fmt::Display for InputValue {
             InputValue::Enum(ref v) => write!(f, "{}", v),
             InputValue::Variable(ref v) => write!(f, "${}", v),
             InputValue::List(ref v) => {
-                try!(write!(f, "["));
+                write!(f, "[")?;
 
                 for (i, spanning) in v.iter().enumerate() {
-                    try!(spanning.item.fmt(f));
+                    spanning.item.fmt(f)?;
                     if i < v.len() - 1 {
-                        try!(write!(f, ", "));
+                        write!(f, ", ")?;
                     }
                 }
 
                 write!(f, "]")
             }
             InputValue::Object(ref o) => {
-                try!(write!(f, "{{"));
+                write!(f, "{{")?;
 
                 for (i, &(ref k, ref v)) in o.iter().enumerate() {
-                    try!(write!(f, "{}: ", k.item));
-                    try!(v.item.fmt(f));
+                    write!(f, "{}: ", k.item)?;
+                    v.item.fmt(f)?;
                     if i < o.len() - 1 {
-                        try!(write!(f, ", "));
+                        write!(f, ", ")?;
                     }
                 }
 
diff --git a/juniper/src/executor/mod.rs b/juniper/src/executor/mod.rs
index d2001572e..c1c84e086 100644
--- a/juniper/src/executor/mod.rs
+++ b/juniper/src/executor/mod.rs
@@ -220,7 +220,8 @@ impl<'a, T: GraphQLType, C> IntoResolvable<'a, T, C> for FieldResult<(&'a T::Con
 }
 
 impl<'a, T: GraphQLType, C> IntoResolvable<'a, Option<T>, C>
-    for FieldResult<Option<(&'a T::Context, T)>> {
+    for FieldResult<Option<(&'a T::Context, T)>>
+{
     fn into(self, _: &'a C) -> FieldResult<Option<(&'a T::Context, Option<T>)>> {
         self.map(|o| o.map(|(ctx, v)| (ctx, Some(v))))
     }
@@ -229,20 +230,20 @@ impl<'a, T: GraphQLType, C> IntoResolvable<'a, Option<T>, C>
 /// Conversion trait for context types
 ///
 /// Used to support different context types for different parts of an
-/// application. By making each GraphQL type only aware of as much
+/// application. By making each `GraphQL` type only aware of as much
 /// context as it needs to, isolation and robustness can be
 /// improved. Implement this trait if you have contexts that can
 /// generally be converted between each other.
 ///
 /// The empty tuple `()` can be converted into from any context type,
-/// making it suitable for GraphQL that don't need _any_ context to
+/// making it suitable for `GraphQL` that don't need _any_ context to
 /// work, e.g. scalars or enums.
 pub trait FromContext<T> {
     /// Perform the conversion
     fn from(value: &T) -> &Self;
 }
 
-/// Marker trait for types that can act as context objects for GraphQL types.
+/// Marker trait for types that can act as context objects for `GraphQL` types.
 pub trait Context {}
 
 impl<'a, C: Context> Context for &'a C {}
diff --git a/juniper/src/http/mod.rs b/juniper/src/http/mod.rs
index 03ad2d221..ac975c347 100644
--- a/juniper/src/http/mod.rs
+++ b/juniper/src/http/mod.rs
@@ -19,7 +19,8 @@ use executor::ExecutionError;
 #[derive(Deserialize, Clone, Serialize, PartialEq, Debug)]
 pub struct GraphQLRequest {
     query: String,
-    #[serde(rename = "operationName")] operation_name: Option<String>,
+    #[serde(rename = "operationName")]
+    operation_name: Option<String>,
     variables: Option<InputValue>,
 }
 
@@ -101,22 +102,22 @@ impl<'a> ser::Serialize for GraphQLResponse<'a> {
     {
         match self.0 {
             Ok((ref res, ref err)) => {
-                let mut map = try!(serializer.serialize_map(None));
+                let mut map = serializer.serialize_map(None)?;
 
-                try!(map.serialize_key("data"));
-                try!(map.serialize_value(res));
+                map.serialize_key("data")?;
+                map.serialize_value(res)?;
 
                 if !err.is_empty() {
-                    try!(map.serialize_key("errors"));
-                    try!(map.serialize_value(err));
+                    map.serialize_key("errors")?;
+                    map.serialize_value(err)?;
                 }
 
                 map.end()
             }
             Err(ref err) => {
-                let mut map = try!(serializer.serialize_map(Some(1)));
-                try!(map.serialize_key("errors"));
-                try!(map.serialize_value(err));
+                let mut map = serializer.serialize_map(Some(1))?;
+                map.serialize_key("errors")?;
+                map.serialize_value(err)?;
                 map.end()
             }
         }
diff --git a/juniper/src/integrations/serde.rs b/juniper/src/integrations/serde.rs
index 896c7fa31..b1b7bdc08 100644
--- a/juniper/src/integrations/serde.rs
+++ b/juniper/src/integrations/serde.rs
@@ -15,21 +15,21 @@ impl ser::Serialize for ExecutionError {
     where
         S: ser::Serializer,
     {
-        let mut map = try!(serializer.serialize_map(Some(4)));
+        let mut map = serializer.serialize_map(Some(4))?;
 
-        try!(map.serialize_key("message"));
-        try!(map.serialize_value(self.error().message()));
+        map.serialize_key("message")?;
+        map.serialize_value(self.error().message())?;
 
         let locations = vec![self.location()];
-        try!(map.serialize_key("locations"));
-        try!(map.serialize_value(&locations));
+        map.serialize_key("locations")?;
+        map.serialize_value(&locations)?;
 
-        try!(map.serialize_key("path"));
-        try!(map.serialize_value(self.path()));
+        map.serialize_key("path")?;
+        map.serialize_value(self.path())?;
 
         if !self.error().data().is_null() {
-            try!(map.serialize_key("data"));
-            try!(map.serialize_value(self.error().data()));
+            map.serialize_key("data")?;
+            map.serialize_value(self.error().data())?;
         }
 
         map.end()
@@ -76,10 +76,10 @@ impl<'de> de::Deserialize<'de> for InputValue {
             where
                 E: de::Error,
             {
-                if value >= i32::min_value() as i64 && value <= i32::max_value() as i64 {
+                if value >= i64::from(i32::min_value()) && value <= i64::from(i32::max_value()) {
                     Ok(InputValue::int(value as i32))
                 } else {
-                    Err(E::custom(format!("integer out of range")))
+                    Err(E::custom("integer out of range"))
                 }
             }
 
@@ -90,7 +90,7 @@ impl<'de> de::Deserialize<'de> for InputValue {
                 if value <= i32::max_value() as u64 {
                     self.visit_i64(value as i64)
                 } else {
-                    Err(E::custom(format!("integer out of range")))
+                    Err(E::custom("integer out of range"))
                 }
             }
 
@@ -123,7 +123,7 @@ impl<'de> de::Deserialize<'de> for InputValue {
             {
                 let mut values = Vec::new();
 
-                while let Some(el) = try!(visitor.next_element()) {
+                while let Some(el) = visitor.next_element()? {
                     values.push(el);
                 }
 
@@ -136,7 +136,7 @@ impl<'de> de::Deserialize<'de> for InputValue {
             {
                 let mut values: IndexMap<String, InputValue> = IndexMap::new();
 
-                while let Some((key, value)) = try!(visitor.next_entry()) {
+                while let Some((key, value)) = visitor.next_entry()? {
                     values.insert(key, value);
                 }
 
@@ -155,7 +155,7 @@ impl ser::Serialize for InputValue {
     {
         match *self {
             InputValue::Null | InputValue::Variable(_) => serializer.serialize_unit(),
-            InputValue::Int(v) => serializer.serialize_i64(v as i64),
+            InputValue::Int(v) => serializer.serialize_i64(i64::from(v)),
             InputValue::Float(v) => serializer.serialize_f64(v),
             InputValue::String(ref v) | InputValue::Enum(ref v) => serializer.serialize_str(v),
             InputValue::Boolean(v) => serializer.serialize_bool(v),
@@ -176,13 +176,13 @@ impl ser::Serialize for RuleError {
     where
         S: ser::Serializer,
     {
-        let mut map = try!(serializer.serialize_map(Some(2)));
+        let mut map = serializer.serialize_map(Some(2))?;
 
-        try!(map.serialize_key("message"));
-        try!(map.serialize_value(self.message()));
+        map.serialize_key("message")?;
+        map.serialize_value(self.message())?;
 
-        try!(map.serialize_key("locations"));
-        try!(map.serialize_value(self.locations()));
+        map.serialize_key("locations")?;
+        map.serialize_value(self.locations())?;
 
         map.end()
     }
@@ -193,15 +193,15 @@ impl ser::Serialize for SourcePosition {
     where
         S: ser::Serializer,
     {
-        let mut map = try!(serializer.serialize_map(Some(2)));
+        let mut map = serializer.serialize_map(Some(2))?;
 
         let line = self.line() + 1;
-        try!(map.serialize_key("line"));
-        try!(map.serialize_value(&line));
+        map.serialize_key("line")?;
+        map.serialize_value(&line)?;
 
         let column = self.column() + 1;
-        try!(map.serialize_key("column"));
-        try!(map.serialize_value(&column));
+        map.serialize_key("column")?;
+        map.serialize_value(&column)?;
 
         map.end()
     }
@@ -212,11 +212,11 @@ impl<'a> ser::Serialize for Spanning<ParseError<'a>> {
     where
         S: ser::Serializer,
     {
-        let mut map = try!(serializer.serialize_map(Some(2)));
+        let mut map = serializer.serialize_map(Some(2))?;
 
         let message = format!("{}", self.item);
-        try!(map.serialize_key("message"));
-        try!(map.serialize_value(&message));
+        map.serialize_key("message")?;
+        map.serialize_value(&message)?;
 
         let mut location = IndexMap::new();
         location.insert("line".to_owned(), self.start.line() + 1);
@@ -224,8 +224,8 @@ impl<'a> ser::Serialize for Spanning<ParseError<'a>> {
 
         let locations = vec![location];
 
-        try!(map.serialize_key("locations"));
-        try!(map.serialize_value(&locations));
+        map.serialize_key("locations")?;
+        map.serialize_value(&locations)?;
 
         map.end()
     }
@@ -238,7 +238,7 @@ impl ser::Serialize for Value {
     {
         match *self {
             Value::Null => serializer.serialize_unit(),
-            Value::Int(v) => serializer.serialize_i64(v as i64),
+            Value::Int(v) => serializer.serialize_i64(i64::from(v)),
             Value::Float(v) => serializer.serialize_f64(v),
             Value::String(ref v) => serializer.serialize_str(v),
             Value::Boolean(v) => serializer.serialize_bool(v),
diff --git a/juniper/src/lib.rs b/juniper/src/lib.rs
index 8398dd727..10ed9bdde 100644
--- a/juniper/src/lib.rs
+++ b/juniper/src/lib.rs
@@ -184,7 +184,7 @@ where
     QueryT: GraphQLType<Context = CtxT>,
     MutationT: GraphQLType<Context = CtxT>,
 {
-    let document = try!(parse_document_source(document_source));
+    let document = parse_document_source(document_source)?;
 
     {
         let errors = validate_input_values(variables, &document, &root_node.schema);
diff --git a/juniper/src/macros/scalar.rs b/juniper/src/macros/scalar.rs
index 3bf8d0844..98082b6c7 100644
--- a/juniper/src/macros/scalar.rs
+++ b/juniper/src/macros/scalar.rs
@@ -57,7 +57,7 @@ macro_rules! graphql_scalar {
     // and body for the from() method on FromInputValue.
     (
         @generate,
-        ( $name:ty, $outname:tt, $descr:tt ),
+        ( $name:ty, $outname:expr, $descr:tt ),
         (
             ( $resolve_selfvar:ident, $resolve_body:block ),
             ( $fiv_arg:ident, $fiv_result:ty, $fiv_body:block )
@@ -135,7 +135,7 @@ macro_rules! graphql_scalar {
     // description: <description>
     (
         @parse,
-        ( $name:ty, $outname:tt, $_ignored:tt ),
+        ( $name:ty, $outname:expr, $_ignored:tt ),
         $acc:tt,
         description: $descr:tt $($rest:tt)*
     ) => {
@@ -151,6 +151,6 @@ macro_rules! graphql_scalar {
     // Entry point
     // RustName { ... }
     ( $name:ty { $( $items:tt )* }) => {
-        graphql_scalar!( @parse, ( $name, (stringify!($name)), None ), ( None, None ), $($items)* );
+        graphql_scalar!( @parse, ( $name, stringify!($name), None ), ( None, None ), $($items)* );
     };
 }
diff --git a/juniper/src/parser/document.rs b/juniper/src/parser/document.rs
index d26e2e483..9e47cc721 100644
--- a/juniper/src/parser/document.rs
+++ b/juniper/src/parser/document.rs
@@ -11,7 +11,7 @@ use parser::value::parse_value_literal;
 #[doc(hidden)]
 pub fn parse_document_source(s: &str) -> UnlocatedParseResult<Document> {
     let mut lexer = Lexer::new(s);
-    let mut parser = try!(Parser::new(&mut lexer).map_err(|s| s.map(ParseError::LexerError)));
+    let mut parser = Parser::new(&mut lexer).map_err(|s| s.map(ParseError::LexerError))?;
     parse_document(&mut parser)
 }
 
@@ -19,7 +19,7 @@ fn parse_document<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Docum
     let mut defs = Vec::new();
 
     loop {
-        defs.push(try!(parse_definition(parser)));
+        defs.push(parse_definition(parser)?);
 
         if parser.peek().item == Token::EndOfFile {
             return Ok(defs);
@@ -29,19 +29,17 @@ fn parse_document<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Docum
 
 fn parse_definition<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Definition<'a>> {
     match parser.peek().item {
-        Token::CurlyOpen | Token::Name("query") | Token::Name("mutation") => Ok(
-            Definition::Operation(try!(parse_operation_definition(parser))),
-        ),
-        Token::Name("fragment") => Ok(Definition::Fragment(try!(parse_fragment_definition(
-            parser
-        )))),
+        Token::CurlyOpen | Token::Name("query") | Token::Name("mutation") => {
+            Ok(Definition::Operation(parse_operation_definition(parser)?))
+        }
+        Token::Name("fragment") => Ok(Definition::Fragment(parse_fragment_definition(parser)?)),
         _ => Err(parser.next()?.map(ParseError::UnexpectedToken)),
     }
 }
 
 fn parse_operation_definition<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Operation<'a>> {
     if parser.peek().item == Token::CurlyOpen {
-        let selection_set = try!(parse_selection_set(parser));
+        let selection_set = parse_selection_set(parser)?;
 
         Ok(Spanning::start_end(
             &selection_set.start,
@@ -56,14 +54,14 @@ fn parse_operation_definition<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Op
         ))
     } else {
         let start_pos = parser.peek().start.clone();
-        let operation_type = try!(parse_operation_type(parser));
+        let operation_type = parse_operation_type(parser)?;
         let name = match parser.peek().item {
-            Token::Name(_) => Some(try!(parser.expect_name())),
+            Token::Name(_) => Some(parser.expect_name()?),
             _ => None,
         };
-        let variable_definitions = try!(parse_variable_definitions(parser));
-        let directives = try!(parse_directives(parser));
-        let selection_set = try!(parse_selection_set(parser));
+        let variable_definitions = parse_variable_definitions(parser)?;
+        let directives = parse_directives(parser)?;
+        let selection_set = parse_selection_set(parser)?;
 
         Ok(Spanning::start_end(
             &start_pos,
@@ -82,7 +80,7 @@ fn parse_operation_definition<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Op
 fn parse_fragment_definition<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Fragment<'a>> {
     let Spanning {
         start: start_pos, ..
-    } = try!(parser.expect(&Token::Name("fragment")));
+    } = parser.expect(&Token::Name("fragment"))?;
     let name = match parser.expect_name() {
         Ok(n) => if n.item == "on" {
             return Err(n.map(|_| ParseError::UnexpectedToken(Token::Name("on"))));
@@ -92,10 +90,10 @@ fn parse_fragment_definition<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Fra
         Err(e) => return Err(e),
     };
 
-    try!(parser.expect(&Token::Name("on")));
-    let type_cond = try!(parser.expect_name());
-    let directives = try!(parse_directives(parser));
-    let selection_set = try!(parse_selection_set(parser));
+    parser.expect(&Token::Name("on"))?;
+    let type_cond = parser.expect_name()?;
+    let directives = parse_directives(parser)?;
+    let selection_set = parse_selection_set(parser)?;
 
     Ok(Spanning::start_end(
         &start_pos,
@@ -113,7 +111,7 @@ fn parse_optional_selection_set<'a>(
     parser: &mut Parser<'a>,
 ) -> OptionParseResult<'a, Vec<Selection<'a>>> {
     if parser.peek().item == Token::CurlyOpen {
-        Ok(Some(try!(parse_selection_set(parser))))
+        Ok(Some(parse_selection_set(parser)?))
     } else {
         Ok(None)
     }
@@ -134,14 +132,14 @@ fn parse_fragment<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Selec
     let Spanning {
         start: ref start_pos,
         ..
-    } = try!(parser.expect(&Token::Ellipsis));
+    } = parser.expect(&Token::Ellipsis)?;
 
     match parser.peek().item {
         Token::Name("on") => {
             parser.next()?;
-            let name = try!(parser.expect_name());
-            let directives = try!(parse_directives(parser));
-            let selection_set = try!(parse_selection_set(parser));
+            let name = parser.expect_name()?;
+            let directives = parse_directives(parser)?;
+            let selection_set = parse_selection_set(parser)?;
 
             Ok(Selection::InlineFragment(Spanning::start_end(
                 &start_pos.clone(),
@@ -154,7 +152,7 @@ fn parse_fragment<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Selec
             )))
         }
         Token::CurlyOpen => {
-            let selection_set = try!(parse_selection_set(parser));
+            let selection_set = parse_selection_set(parser)?;
 
             Ok(Selection::InlineFragment(Spanning::start_end(
                 &start_pos.clone(),
@@ -167,8 +165,8 @@ fn parse_fragment<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Selec
             )))
         }
         Token::Name(_) => {
-            let frag_name = try!(parser.expect_name());
-            let directives = try!(parse_directives(parser));
+            let frag_name = parser.expect_name()?;
+            let directives = parse_directives(parser)?;
 
             Ok(Selection::FragmentSpread(Spanning::start_end(
                 &start_pos.clone(),
@@ -183,8 +181,8 @@ fn parse_fragment<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Selec
             )))
         }
         Token::At => {
-            let directives = try!(parse_directives(parser));
-            let selection_set = try!(parse_selection_set(parser));
+            let directives = parse_directives(parser)?;
+            let selection_set = parse_selection_set(parser)?;
 
             Ok(Selection::InlineFragment(Spanning::start_end(
                 &start_pos.clone(),
@@ -201,17 +199,17 @@ fn parse_fragment<'a>(parser: &mut Parser<'a>) -> UnlocatedParseResult<'a, Selec
 }
 
 fn parse_field<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Field<'a>> {
-    let mut alias = Some(try!(parser.expect_name()));
+    let mut alias = Some(parser.expect_name()?);
 
-    let name = if try!(parser.skip(&Token::Colon)).is_some() {
-        try!(parser.expect_name())
+    let name = if parser.skip(&Token::Colon)?.is_some() {
+        parser.expect_name()?
     } else {
         alias.take().unwrap()
     };
 
-    let arguments = try!(parse_arguments(parser));
-    let directives = try!(parse_directives(parser));
-    let selection_set = try!(parse_optional_selection_set(parser));
+    let arguments = parse_arguments(parser)?;
+    let directives = parse_directives(parser)?;
+    let selection_set = parse_optional_selection_set(parser)?;
 
     Ok(Spanning::start_end(
         &alias.as_ref().unwrap_or(&name).start.clone(),
@@ -237,13 +235,11 @@ fn parse_arguments<'a>(parser: &mut Parser<'a>) -> OptionParseResult<'a, Argumen
         Ok(None)
     } else {
         Ok(Some(
-            try!(parser.delimited_nonempty_list(
-                &Token::ParenOpen,
-                parse_argument,
-                &Token::ParenClose
-            )).map(|args| Arguments {
-                items: args.into_iter().map(|s| s.item).collect(),
-            }),
+            parser
+                .delimited_nonempty_list(&Token::ParenOpen, parse_argument, &Token::ParenClose)?
+                .map(|args| Arguments {
+                    items: args.into_iter().map(|s| s.item).collect(),
+                }),
         ))
     }
 }
@@ -251,9 +247,9 @@ fn parse_arguments<'a>(parser: &mut Parser<'a>) -> OptionParseResult<'a, Argumen
 fn parse_argument<'a>(
     parser: &mut Parser<'a>,
 ) -> ParseResult<'a, (Spanning<&'a str>, Spanning<InputValue>)> {
-    let name = try!(parser.expect_name());
-    try!(parser.expect(&Token::Colon));
-    let value = try!(parse_value_literal(parser, false));
+    let name = parser.expect_name()?;
+    parser.expect(&Token::Colon)?;
+    let value = parse_value_literal(parser, false)?;
 
     Ok(Spanning::start_end(
         &name.start.clone(),
@@ -277,13 +273,15 @@ fn parse_variable_definitions<'a>(
         Ok(None)
     } else {
         Ok(Some(
-            try!(parser.delimited_nonempty_list(
-                &Token::ParenOpen,
-                parse_variable_definition,
-                &Token::ParenClose
-            )).map(|defs| VariableDefinitions {
-                items: defs.into_iter().map(|s| s.item).collect(),
-            }),
+            parser
+                .delimited_nonempty_list(
+                    &Token::ParenOpen,
+                    parse_variable_definition,
+                    &Token::ParenClose,
+                )?
+                .map(|defs| VariableDefinitions {
+                    items: defs.into_iter().map(|s| s.item).collect(),
+                }),
         ))
     }
 }
@@ -293,13 +291,13 @@ fn parse_variable_definition<'a>(
 ) -> ParseResult<'a, (Spanning<&'a str>, VariableDefinition<'a>)> {
     let Spanning {
         start: start_pos, ..
-    } = try!(parser.expect(&Token::Dollar));
-    let var_name = try!(parser.expect_name());
-    try!(parser.expect(&Token::Colon));
-    let var_type = try!(parse_type(parser));
+    } = parser.expect(&Token::Dollar)?;
+    let var_name = parser.expect_name()?;
+    parser.expect(&Token::Colon)?;
+    let var_type = parse_type(parser)?;
 
-    let default_value = if try!(parser.skip(&Token::Equals)).is_some() {
-        Some(try!(parse_value_literal(parser, true)))
+    let default_value = if parser.skip(&Token::Equals)?.is_some() {
+        Some(parse_value_literal(parser, true)?)
     } else {
         None
     };
@@ -328,7 +326,7 @@ fn parse_directives<'a>(
     } else {
         let mut items = Vec::new();
         while parser.peek().item == Token::At {
-            items.push(try!(parse_directive(parser)));
+            items.push(parse_directive(parser)?);
         }
 
         Ok(Spanning::spanning(items))
@@ -338,9 +336,9 @@ fn parse_directives<'a>(
 fn parse_directive<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Directive<'a>> {
     let Spanning {
         start: start_pos, ..
-    } = try!(parser.expect(&Token::At));
-    let name = try!(parser.expect_name());
-    let arguments = try!(parse_arguments(parser));
+    } = parser.expect(&Token::At)?;
+    let name = parser.expect_name()?;
+    let arguments = parse_arguments(parser)?;
 
     Ok(Spanning::start_end(
         &start_pos,
@@ -355,20 +353,20 @@ fn parse_directive<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Directive<'a>
 pub fn parse_type<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, Type<'a>> {
     let parsed_type = if let Some(Spanning {
         start: start_pos, ..
-    }) = try!(parser.skip(&Token::BracketOpen))
+    }) = parser.skip(&Token::BracketOpen)?
     {
-        let inner_type = try!(parse_type(parser));
-        let Spanning { end: end_pos, .. } = try!(parser.expect(&Token::BracketClose));
+        let inner_type = parse_type(parser)?;
+        let Spanning { end: end_pos, .. } = parser.expect(&Token::BracketClose)?;
         Spanning::start_end(&start_pos, &end_pos, Type::List(Box::new(inner_type.item)))
     } else {
-        try!(parser.expect_name()).map(|s| Type::Named(Cow::Borrowed(s)))
+        parser.expect_name()?.map(|s| Type::Named(Cow::Borrowed(s)))
     };
 
     Ok(match *parser.peek() {
         Spanning {
             item: Token::ExclamationMark,
             ..
-        } => try!(wrap_non_null(parser, parsed_type)),
+        } => wrap_non_null(parser, parsed_type)?,
         _ => parsed_type,
     })
 }
@@ -377,7 +375,7 @@ fn wrap_non_null<'a>(
     parser: &mut Parser<'a>,
     inner: Spanning<Type<'a>>,
 ) -> ParseResult<'a, Type<'a>> {
-    let Spanning { end: end_pos, .. } = try!(parser.expect(&Token::ExclamationMark));
+    let Spanning { end: end_pos, .. } = parser.expect(&Token::ExclamationMark)?;
 
     let wrapped = match inner.item {
         Type::Named(name) => Type::NonNullNamed(name),
diff --git a/juniper/src/parser/lexer.rs b/juniper/src/parser/lexer.rs
index 88d065320..2526d1c0f 100644
--- a/juniper/src/parser/lexer.rs
+++ b/juniper/src/parser/lexer.rs
@@ -160,10 +160,10 @@ impl<'a> Lexer<'a> {
         let start_pos = self.position.clone();
 
         for _ in 0..3 {
-            let (_, ch) = try!(self.next_char().ok_or(Spanning::zero_width(
+            let (_, ch) = self.next_char().ok_or(Spanning::zero_width(
                 &self.position,
-                LexerError::UnexpectedEndOfFile
-            )));
+                LexerError::UnexpectedEndOfFile,
+            ))?;
             if ch != '.' {
                 return Err(Spanning::zero_width(
                     &start_pos,
@@ -181,10 +181,10 @@ impl<'a> Lexer<'a> {
 
     fn scan_name(&mut self) -> LexerResult<'a> {
         let start_pos = self.position.clone();
-        let (start_idx, start_ch) = try!(self.next_char().ok_or(Spanning::zero_width(
+        let (start_idx, start_ch) = self.next_char().ok_or(Spanning::zero_width(
             &self.position,
-            LexerError::UnexpectedEndOfFile
-        )));
+            LexerError::UnexpectedEndOfFile,
+        ))?;
         assert!(is_name_start(start_ch));
 
         let mut end_idx = start_idx;
@@ -207,10 +207,10 @@ impl<'a> Lexer<'a> {
 
     fn scan_string(&mut self) -> LexerResult<'a> {
         let start_pos = self.position.clone();
-        let (_, start_ch) = try!(self.next_char().ok_or(Spanning::zero_width(
+        let (_, start_ch) = self.next_char().ok_or(Spanning::zero_width(
             &self.position,
-            LexerError::UnexpectedEndOfFile
-        )));
+            LexerError::UnexpectedEndOfFile,
+        ))?;
         assert!(start_ch == '"');
 
         let mut acc = String::new();
@@ -262,7 +262,7 @@ impl<'a> Lexer<'a> {
                     Some((_, 'u')) => {
                         let start_pos = self.position.clone();
                         self.next_char();
-                        acc.push(try!(self.scan_escaped_unicode(&start_pos)));
+                        acc.push(self.scan_escaped_unicode(&start_pos)?);
                     }
                     Some((_, ch)) => {
                         let mut s = String::from("\\");
@@ -314,18 +314,18 @@ impl<'a> Lexer<'a> {
         &mut self,
         start_pos: &SourcePosition,
     ) -> Result<char, Spanning<LexerError>> {
-        let (start_idx, _) = try!(self.peek_char().ok_or(Spanning::zero_width(
+        let (start_idx, _) = self.peek_char().ok_or(Spanning::zero_width(
             &self.position,
-            LexerError::UnterminatedString
-        )));
+            LexerError::UnterminatedString,
+        ))?;
         let mut end_idx = start_idx;
         let mut len = 0;
 
         for _ in 0..4 {
-            let (idx, ch) = try!(self.next_char().ok_or(Spanning::zero_width(
+            let (idx, ch) = self.next_char().ok_or(Spanning::zero_width(
                 &self.position,
-                LexerError::UnterminatedString
-            )));
+                LexerError::UnterminatedString,
+            ))?;
 
             if !ch.is_alphanumeric() {
                 break;
@@ -344,12 +344,12 @@ impl<'a> Lexer<'a> {
             ));
         }
 
-        let code_point = try!(
-            u32::from_str_radix(escape, 16).map_err(|_| Spanning::zero_width(
+        let code_point = u32::from_str_radix(escape, 16).map_err(|_| {
+            Spanning::zero_width(
                 start_pos,
                 LexerError::UnknownEscapeSequence("\\u".to_owned() + escape),
-            ))
-        );
+            )
+        })?;
 
         char::from_u32(code_point).ok_or_else(|| {
             Spanning::zero_width(
@@ -361,14 +361,14 @@ impl<'a> Lexer<'a> {
 
     fn scan_number(&mut self) -> LexerResult<'a> {
         let start_pos = self.position.clone();
-        let int_part = try!(self.scan_integer_part());
+        let int_part = self.scan_integer_part()?;
         let mut frac_part = None;
         let mut exp_part = None;
 
         if let Some((_, '.')) = self.peek_char() {
             self.next_char();
 
-            frac_part = Some(try!(self.scan_digits()));
+            frac_part = Some(self.scan_digits()?);
         }
 
         if let Some((_, ch)) = self.peek_char() {
@@ -385,12 +385,12 @@ impl<'a> Lexer<'a> {
                         self.next_char();
                     }
                 }
-                exp_part = Some(if is_negative { -1 } else { 1 } * try!(self.scan_digits()));
+                exp_part = Some(if is_negative { -1 } else { 1 } * self.scan_digits()?);
             }
         }
 
         let mantissa = frac_part
-            .map(|f| f as f64)
+            .map(|f| f64::from(f))
             .map(|frac| {
                 if frac > 0f64 {
                     frac / 10f64.powf(frac.log10().floor() + 1f64)
@@ -400,26 +400,28 @@ impl<'a> Lexer<'a> {
             })
             .map(|m| if int_part < 0 { -m } else { m });
 
-        let exp = exp_part.map(|e| e as f64).map(|e| 10f64.powf(e));
+        let exp = exp_part.map(|e| f64::from(e)).map(|e| 10f64.powf(e));
 
         Ok(Spanning::start_end(
             &start_pos,
             &self.position,
             match (mantissa, exp) {
                 (None, None) => Token::Int(int_part),
-                (None, Some(exp)) => Token::Float((int_part as f64) * exp),
-                (Some(mantissa), None) => Token::Float((int_part as f64) + mantissa),
-                (Some(mantissa), Some(exp)) => Token::Float(((int_part as f64) + mantissa) * exp),
+                (None, Some(exp)) => Token::Float((f64::from(int_part)) * exp),
+                (Some(mantissa), None) => Token::Float((f64::from(int_part)) + mantissa),
+                (Some(mantissa), Some(exp)) => {
+                    Token::Float(((f64::from(int_part)) + mantissa) * exp)
+                }
             },
         ))
     }
 
     fn scan_integer_part(&mut self) -> Result<i32, Spanning<LexerError>> {
         let is_negative = {
-            let (_, init_ch) = try!(self.peek_char().ok_or(Spanning::zero_width(
+            let (_, init_ch) = self.peek_char().ok_or(Spanning::zero_width(
                 &self.position,
-                LexerError::UnexpectedEndOfFile
-            )));
+                LexerError::UnexpectedEndOfFile,
+            ))?;
 
             if init_ch == '-' {
                 self.next_char();
@@ -429,10 +431,10 @@ impl<'a> Lexer<'a> {
             }
         };
 
-        let (_, ch) = try!(self.peek_char().ok_or(Spanning::zero_width(
+        let (_, ch) = self.peek_char().ok_or(Spanning::zero_width(
             &self.position,
-            LexerError::UnexpectedEndOfFile
-        )));
+            LexerError::UnexpectedEndOfFile,
+        ))?;
 
         if ch == '0' {
             self.next_char();
@@ -445,16 +447,16 @@ impl<'a> Lexer<'a> {
                 _ => Ok(0),
             }
         } else {
-            Ok(try!(self.scan_digits()) * if is_negative { -1 } else { 1 })
+            Ok(self.scan_digits()? * if is_negative { -1 } else { 1 })
         }
     }
 
     fn scan_digits(&mut self) -> Result<i32, Spanning<LexerError>> {
         let start_pos = self.position.clone();
-        let (start_idx, ch) = try!(self.peek_char().ok_or(Spanning::zero_width(
+        let (start_idx, ch) = self.peek_char().ok_or(Spanning::zero_width(
             &self.position,
-            LexerError::UnexpectedEndOfFile
-        )));
+            LexerError::UnexpectedEndOfFile,
+        ))?;
         let mut end_idx = start_idx;
 
         if !ch.is_digit(10) {
diff --git a/juniper/src/parser/parser.rs b/juniper/src/parser/parser.rs
index c700e2cad..e85b5e3ab 100644
--- a/juniper/src/parser/parser.rs
+++ b/juniper/src/parser/parser.rs
@@ -103,15 +103,15 @@ impl<'a> Parser<'a> {
     {
         let Spanning {
             start: start_pos, ..
-        } = try!(self.expect(opening));
+        } = self.expect(opening)?;
         let mut items = Vec::new();
 
         loop {
-            if let Some(Spanning { end: end_pos, .. }) = try!(self.skip(closing)) {
+            if let Some(Spanning { end: end_pos, .. }) = self.skip(closing)? {
                 return Ok(Spanning::start_end(&start_pos, &end_pos, items));
             }
 
-            items.push(try!(parser(self)));
+            items.push(parser(self)?);
         }
     }
 
@@ -128,13 +128,13 @@ impl<'a> Parser<'a> {
     {
         let Spanning {
             start: start_pos, ..
-        } = try!(self.expect(opening));
+        } = self.expect(opening)?;
         let mut items = Vec::new();
 
         loop {
-            items.push(try!(parser(self)));
+            items.push(parser(self)?);
 
-            if let Some(Spanning { end: end_pos, .. }) = try!(self.skip(closing)) {
+            if let Some(Spanning { end: end_pos, .. }) = self.skip(closing)? {
                 return Ok(Spanning::start_end(&start_pos, &end_pos, items));
             }
         }
@@ -153,13 +153,13 @@ impl<'a> Parser<'a> {
     {
         let Spanning {
             start: start_pos, ..
-        } = try!(self.expect(opening));
+        } = self.expect(opening)?;
         let mut items = Vec::new();
 
         loop {
-            items.push(try!(parser(self)));
+            items.push(parser(self)?);
 
-            if let Some(Spanning { end: end_pos, .. }) = try!(self.skip(closing)) {
+            if let Some(Spanning { end: end_pos, .. }) = self.skip(closing)? {
                 return Ok(Spanning::start_end(&start_pos, &end_pos, items));
             }
         }
diff --git a/juniper/src/parser/value.rs b/juniper/src/parser/value.rs
index 3bd5678b3..016df991c 100644
--- a/juniper/src/parser/value.rs
+++ b/juniper/src/parser/value.rs
@@ -63,33 +63,37 @@ pub fn parse_value_literal<'a>(
 }
 
 fn parse_list_literal<'a>(parser: &mut Parser<'a>, is_const: bool) -> ParseResult<'a, InputValue> {
-    Ok(try!(parser.delimited_list(
-        &Token::BracketOpen,
-        |p| parse_value_literal(p, is_const),
-        &Token::BracketClose
-    )).map(InputValue::parsed_list))
+    Ok(parser
+        .delimited_list(
+            &Token::BracketOpen,
+            |p| parse_value_literal(p, is_const),
+            &Token::BracketClose,
+        )?
+        .map(InputValue::parsed_list))
 }
 
 fn parse_object_literal<'a>(
     parser: &mut Parser<'a>,
     is_const: bool,
 ) -> ParseResult<'a, InputValue> {
-    Ok(try!(parser.delimited_list(
-        &Token::CurlyOpen,
-        |p| parse_object_field(p, is_const),
-        &Token::CurlyClose
-    )).map(|items| InputValue::parsed_object(items.into_iter().map(|s| s.item).collect())))
+    Ok(parser
+        .delimited_list(
+            &Token::CurlyOpen,
+            |p| parse_object_field(p, is_const),
+            &Token::CurlyClose,
+        )?
+        .map(|items| InputValue::parsed_object(items.into_iter().map(|s| s.item).collect())))
 }
 
 fn parse_object_field<'a>(
     parser: &mut Parser<'a>,
     is_const: bool,
 ) -> ParseResult<'a, (Spanning<String>, Spanning<InputValue>)> {
-    let key = try!(parser.expect_name());
+    let key = parser.expect_name()?;
 
-    try!(parser.expect(&Token::Colon));
+    parser.expect(&Token::Colon)?;
 
-    let value = try!(parse_value_literal(parser, is_const));
+    let value = parse_value_literal(parser, is_const)?;
 
     Ok(Spanning::start_end(
         &key.start.clone(),
@@ -101,12 +105,12 @@ fn parse_object_field<'a>(
 fn parse_variable_literal<'a>(parser: &mut Parser<'a>) -> ParseResult<'a, InputValue> {
     let Spanning {
         start: start_pos, ..
-    } = try!(parser.expect(&Token::Dollar));
+    } = parser.expect(&Token::Dollar)?;
     let Spanning {
         item: name,
         end: end_pos,
         ..
-    } = try!(parser.expect_name());
+    } = parser.expect_name()?;
 
     Ok(Spanning::start_end(
         &start_pos,
diff --git a/juniper/src/schema/meta.rs b/juniper/src/schema/meta.rs
index 9e8a67903..cdfb4f298 100644
--- a/juniper/src/schema/meta.rs
+++ b/juniper/src/schema/meta.rs
@@ -1,4 +1,4 @@
-//! Types used to describe a GraphQL schema
+//! Types used to describe a `GraphQL` schema
 
 use std::borrow::Cow;
 use std::fmt;
@@ -8,62 +8,85 @@ use types::base::TypeKind;
 
 /// Scalar type metadata
 pub struct ScalarMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
 }
 
 /// List type metadata
 #[derive(Debug)]
 pub struct ListMeta<'a> {
-    #[doc(hidden)] pub of_type: Type<'a>,
+    #[doc(hidden)]
+    pub of_type: Type<'a>,
 }
 
 /// Nullable type metadata
 #[derive(Debug)]
 pub struct NullableMeta<'a> {
-    #[doc(hidden)] pub of_type: Type<'a>,
+    #[doc(hidden)]
+    pub of_type: Type<'a>,
 }
 
 /// Object type metadata
 #[derive(Debug)]
 pub struct ObjectMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub fields: Vec<Field<'a>>,
-    #[doc(hidden)] pub interface_names: Vec<String>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub fields: Vec<Field<'a>>,
+    #[doc(hidden)]
+    pub interface_names: Vec<String>,
 }
 
 /// Enum type metadata
 pub struct EnumMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub values: Vec<EnumValue>,
-    #[doc(hidden)] pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub values: Vec<EnumValue>,
+    #[doc(hidden)]
+    pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
 }
 
 /// Interface type metadata
 #[derive(Debug)]
 pub struct InterfaceMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub fields: Vec<Field<'a>>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub fields: Vec<Field<'a>>,
 }
 
 /// Union type metadata
 #[derive(Debug)]
 pub struct UnionMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub of_type_names: Vec<String>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub of_type_names: Vec<String>,
 }
 
 /// Input object metadata
 pub struct InputObjectMeta<'a> {
-    #[doc(hidden)] pub name: Cow<'a, str>,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub input_fields: Vec<Argument<'a>>,
-    #[doc(hidden)] pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
+    #[doc(hidden)]
+    pub name: Cow<'a, str>,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub input_fields: Vec<Argument<'a>>,
+    #[doc(hidden)]
+    pub try_parse_fn: Box<Fn(&InputValue) -> bool + Send + Sync>,
 }
 
 /// A placeholder for not-yet-registered types
@@ -72,7 +95,8 @@ pub struct InputObjectMeta<'a> {
 /// is inserted into a registry to indicate existence.
 #[derive(Debug)]
 pub struct PlaceholderMeta<'a> {
-    #[doc(hidden)] pub of_type: Type<'a>,
+    #[doc(hidden)]
+    pub of_type: Type<'a>,
 }
 
 /// Generic type metadata
@@ -92,20 +116,29 @@ pub enum MetaType<'a> {
 /// Metadata for a field
 #[derive(Debug, Clone)]
 pub struct Field<'a> {
-    #[doc(hidden)] pub name: String,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub arguments: Option<Vec<Argument<'a>>>,
-    #[doc(hidden)] pub field_type: Type<'a>,
-    #[doc(hidden)] pub deprecation_reason: Option<String>,
+    #[doc(hidden)]
+    pub name: String,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub arguments: Option<Vec<Argument<'a>>>,
+    #[doc(hidden)]
+    pub field_type: Type<'a>,
+    #[doc(hidden)]
+    pub deprecation_reason: Option<String>,
 }
 
 /// Metadata for an argument to a field
 #[derive(Debug, Clone)]
 pub struct Argument<'a> {
-    #[doc(hidden)] pub name: String,
-    #[doc(hidden)] pub description: Option<String>,
-    #[doc(hidden)] pub arg_type: Type<'a>,
-    #[doc(hidden)] pub default_value: Option<InputValue>,
+    #[doc(hidden)]
+    pub name: String,
+    #[doc(hidden)]
+    pub description: Option<String>,
+    #[doc(hidden)]
+    pub arg_type: Type<'a>,
+    #[doc(hidden)]
+    pub default_value: Option<InputValue>,
 }
 
 /// Metadata for a single value in an enum
diff --git a/juniper/src/schema/model.rs b/juniper/src/schema/model.rs
index 20aa1d95e..7fb577341 100644
--- a/juniper/src/schema/model.rs
+++ b/juniper/src/schema/model.rs
@@ -13,11 +13,16 @@ use schema::meta::{Argument, InterfaceMeta, MetaType, ObjectMeta, PlaceholderMet
 /// This brings the mutation and query types together, and provides the
 /// predefined metadata fields.
 pub struct RootNode<'a, QueryT: GraphQLType, MutationT: GraphQLType> {
-    #[doc(hidden)] pub query_type: QueryT,
-    #[doc(hidden)] pub query_info: QueryT::TypeInfo,
-    #[doc(hidden)] pub mutation_type: MutationT,
-    #[doc(hidden)] pub mutation_info: MutationT::TypeInfo,
-    #[doc(hidden)] pub schema: SchemaType<'a>,
+    #[doc(hidden)]
+    pub query_type: QueryT,
+    #[doc(hidden)]
+    pub query_info: QueryT::TypeInfo,
+    #[doc(hidden)]
+    pub mutation_type: MutationT,
+    #[doc(hidden)]
+    pub mutation_info: MutationT::TypeInfo,
+    #[doc(hidden)]
+    pub schema: SchemaType<'a>,
 }
 
 /// Metadata for a schema
diff --git a/juniper/src/types/base.rs b/juniper/src/types/base.rs
index 7af96420e..79dae2e2a 100644
--- a/juniper/src/types/base.rs
+++ b/juniper/src/types/base.rs
@@ -374,7 +374,7 @@ where
 
                 let sub_exec = executor.field_sub_executor(
                     response_name,
-                    &f.name.item,
+                    f.name.item,
                     start_pos.clone(),
                     f.selection_set.as_ref().map(|v| &v[..]),
                 );
diff --git a/juniper/src/types/name.rs b/juniper/src/types/name.rs
index 9208c6d23..f146814fb 100644
--- a/juniper/src/types/name.rs
+++ b/juniper/src/types/name.rs
@@ -30,7 +30,7 @@ impl Name {
                 }
             }
         }
-        return input.len() > 0;
+        return !input.is_empty();
     }
 }
 
diff --git a/juniper/src/types/scalars.rs b/juniper/src/types/scalars.rs
index 9ebbbf611..31042b5ad 100644
--- a/juniper/src/types/scalars.rs
+++ b/juniper/src/types/scalars.rs
@@ -113,7 +113,7 @@ graphql_scalar!(f64 as "Float" {
 
     from_input_value(v: &InputValue) -> Option<f64> {
         match *v {
-            InputValue::Int(i) => Some(i as f64),
+            InputValue::Int(i) => Some(f64::from(i)),
             InputValue::Float(f) => Some(f),
             _ => None,
         }
diff --git a/juniper_iron/examples/iron_server.rs b/juniper_iron/examples/iron_server.rs
index 31a3324c5..6ef250fad 100644
--- a/juniper_iron/examples/iron_server.rs
+++ b/juniper_iron/examples/iron_server.rs
@@ -37,7 +37,7 @@ fn main() {
     chain.link_before(logger_before);
     chain.link_after(logger_after);
 
-    let host = env::var("LISTEN").unwrap_or("0.0.0.0:8080".to_owned());
+    let host = env::var("LISTEN").unwrap_or_else(|_| "0.0.0.0:8080".to_owned());
     println!("GraphQL server started on {}", host);
     Iron::new(chain).http(host.as_str()).unwrap();
 }
diff --git a/juniper_iron/src/lib.rs b/juniper_iron/src/lib.rs
index d7a7d249d..58395e2e0 100644
--- a/juniper_iron/src/lib.rs
+++ b/juniper_iron/src/lib.rs
@@ -125,7 +125,7 @@ use serde_json::error::Error as SerdeError;
 use juniper::{GraphQLType, InputValue, RootNode};
 use juniper::http;
 
-/// Handler that executes GraphQL queries in the given schema
+/// Handler that executes `GraphQL` queries in the given schema
 ///
 /// The handler responds to GET requests and POST requests only. In GET
 /// requests, the query should be supplied in the `query` URL parameter, e.g.
@@ -146,7 +146,7 @@ where
     root_node: RootNode<'a, Query, Mutation>,
 }
 
-/// Handler that renders GraphiQL - a graphical query editor interface
+/// Handler that renders `GraphiQL` - a graphical query editor interface
 pub struct GraphiQLHandler {
     graphql_url: String,
 }
@@ -201,7 +201,7 @@ where
 
     fn handle_get(&self, req: &mut Request) -> IronResult<http::GraphQLRequest> {
         let url_query_string = req.get_mut::<UrlEncodedQuery>()
-            .map_err(|e| GraphQLIronError::Url(e))?;
+            .map_err(GraphQLIronError::Url)?;
 
         let input_query = parse_url_param(url_query_string.remove("query"))?
             .ok_or_else(|| GraphQLIronError::InvalidData("No query provided"))?;
@@ -221,7 +221,7 @@ where
 
         Ok(
             serde_json::from_str::<http::GraphQLRequest>(request_payload.as_str())
-                .map_err(|err| GraphQLIronError::Serde(err))?,
+                .map_err(GraphQLIronError::Serde)?,
         )
     }
 
@@ -296,7 +296,7 @@ impl fmt::Display for GraphQLIronError {
         match *self {
             GraphQLIronError::Serde(ref err) => fmt::Display::fmt(err, &mut f),
             GraphQLIronError::Url(ref err) => fmt::Display::fmt(err, &mut f),
-            GraphQLIronError::InvalidData(ref err) => fmt::Display::fmt(err, &mut f),
+            GraphQLIronError::InvalidData(err) => fmt::Display::fmt(err, &mut f),
         }
     }
 }
@@ -306,7 +306,7 @@ impl Error for GraphQLIronError {
         match *self {
             GraphQLIronError::Serde(ref err) => err.description(),
             GraphQLIronError::Url(ref err) => err.description(),
-            GraphQLIronError::InvalidData(ref err) => err,
+            GraphQLIronError::InvalidData(err) => err,
         }
     }
 


Test patch:
diff --git a/juniper/src/executor_tests/introspection/input_object.rs b/juniper/src/executor_tests/introspection/input_object.rs
index 211fc7617..f72d0b5ca 100644
--- a/juniper/src/executor_tests/introspection/input_object.rs
+++ b/juniper/src/executor_tests/introspection/input_object.rs
@@ -68,15 +68,19 @@ pub struct NamedPublic {
 #[derive(GraphQLInputObject, Debug)]
 #[graphql(_internal)]
 struct FieldDescription {
-    #[graphql(description = "The first field")] field_one: String,
-    #[graphql(description = "The second field")] field_two: String,
+    #[graphql(description = "The first field")]
+    field_one: String,
+    #[graphql(description = "The second field")]
+    field_two: String,
 }
 
 #[derive(GraphQLInputObject, Debug)]
 #[graphql(_internal)]
 struct FieldWithDefaults {
-    #[graphql(default = "123")] field_one: i32,
-    #[graphql(default = "456", description = "The second field")] field_two: i32,
+    #[graphql(default = "123")]
+    field_one: i32,
+    #[graphql(default = "456", description = "The second field")]
+    field_two: i32,
 }
 
 graphql_object!(Root: () |&self| {
diff --git a/juniper/src/executor_tests/variables.rs b/juniper/src/executor_tests/variables.rs
index e385cfd8b..b67a1ed2c 100644
--- a/juniper/src/executor_tests/variables.rs
+++ b/juniper/src/executor_tests/variables.rs
@@ -56,7 +56,8 @@ struct ExampleInputObject {
 #[derive(GraphQLInputObject, Debug)]
 #[graphql(_internal)]
 struct InputWithDefaults {
-    #[graphql(default = "123")] a: i32,
+    #[graphql(default = "123")]
+    a: i32,
 }
 
 graphql_object!(TestType: () |&self| {