src/tokenizer/mod.rs:647:17: 647:29 warning: unneeded return statement. Consider using `false` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:647 return false;
^~~~~~~~~~~~
src/tokenizer/mod.rs:647:17: 647:29 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/mod.rs:594:47: 594:59 warning: unneeded return statement. Consider using `false` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:594 ( $me:ident : eof ) => ({ $me.emit_eof(); return false; });
^~~~~~~~~~~~
src/tokenizer/mod.rs:1273:20: 1273:34 note: in this expansion of go! (defined in src/tokenizer/mod.rs)
src/tokenizer/mod.rs:594:47: 594:59 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/mod.rs:578:92: 578:103 warning: unneeded return statement. Consider using `true` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:578 ( $me:ident : to $s:ident $k1:ident $k2:expr ) => ({ $me.state = states::$s($k1($k2)); return true; });
^~~~~~~~~~~
src/tokenizer/mod.rs:1290:20: 1290:73 note: in this expansion of go! (defined in src/tokenizer/mod.rs)
src/tokenizer/mod.rs:578:92: 578:103 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/mod.rs:578:92: 578:103 warning: unneeded return statement. Consider using `true` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:578 ( $me:ident : to $s:ident $k1:ident $k2:expr ) => ({ $me.state = states::$s($k1($k2)); return true; });
^~~~~~~~~~~
src/tokenizer/mod.rs:1302:20: 1302:64 note: in this expansion of go! (defined in src/tokenizer/mod.rs)
src/tokenizer/mod.rs:578:92: 578:103 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/mod.rs:577:87: 577:98 warning: unneeded return statement. Consider using `true` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:577 ( $me:ident : to $s:ident $k1:expr ) => ({ $me.state = states::$s($k1); return true; });
^~~~~~~~~~~
src/tokenizer/mod.rs:1305:20: 1305:52 note: in this expansion of go! (defined in src/tokenizer/mod.rs)
src/tokenizer/mod.rs:577:87: 577:98 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/mod.rs:578:92: 578:103 warning: unneeded return statement. Consider using `true` without the return and trailing semicolon, #[warn(needless_return)] on by default
src/tokenizer/mod.rs:578 ( $me:ident : to $s:ident $k1:ident $k2:expr ) => ({ $me.state = states::$s($k1($k2)); return true; });
^~~~~~~~~~~
src/tokenizer/mod.rs:1308:20: 1308:73 note: in this expansion of go! (defined in src/tokenizer/mod.rs)
src/tokenizer/mod.rs:578:92: 578:103 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_return
src/tokenizer/char_ref/mod.rs:88:5: 91:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/tokenizer/char_ref/mod.rs:88 fn name_buf<'t>(&'t self) -> &'t StrTendril {
src/tokenizer/char_ref/mod.rs:89 self.name_buf_opt.as_ref()
src/tokenizer/char_ref/mod.rs:90 .expect("name_buf missing in named character reference")
src/tokenizer/char_ref/mod.rs:91 }
src/tokenizer/char_ref/mod.rs:88:5: 91:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tokenizer/char_ref/mod.rs:93:5: 96:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/tokenizer/char_ref/mod.rs:93 fn name_buf_mut<'t>(&'t mut self) -> &'t mut StrTendril {
src/tokenizer/char_ref/mod.rs:94 self.name_buf_opt.as_mut()
src/tokenizer/char_ref/mod.rs:95 .expect("name_buf missing in named character reference")
src/tokenizer/char_ref/mod.rs:96 }
src/tokenizer/char_ref/mod.rs:93:5: 96:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tokenizer/buffer_queue.rs:64:5: 78:6 warning: defining a method called `next` on this type; consider implementing the `std::iter::Iterator` trait or choosing a less ambiguous name, #[warn(should_implement_trait)] on by default
src/tokenizer/buffer_queue.rs:64 pub fn next(&mut self) -> Option<char> {
src/tokenizer/buffer_queue.rs:65 let (result, now_empty) = match self.buffers.front_mut() {
src/tokenizer/buffer_queue.rs:66 None => (None, false),
src/tokenizer/buffer_queue.rs:67 Some(buf) => {
src/tokenizer/buffer_queue.rs:68 let c = buf.pop_front_char().expect("empty buffer in queue");
src/tokenizer/buffer_queue.rs:69 (Some(c), buf.is_empty())
...
src/tokenizer/buffer_queue.rs:64:5: 78:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#should_implement_trait
src/tokenizer/buffer_queue.rs:128:17: 128:24 warning: `ref` on an entire `let` pattern is discouraged, take a reference with & instead, #[warn(toplevel_ref_arg)] on by default
src/tokenizer/buffer_queue.rs:128 let ref buf = self.buffers[buffers_exhausted];
^~~~~~~
src/tokenizer/buffer_queue.rs:128:17: 128:24 help: try `let buf = &self.buffers[buffers_exhausted];`
for further information visit https://github.com/Manishearth/rust-clippy/wiki#toplevel_ref_arg
src/tokenizer/mod.rs:202:5: 204:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/tokenizer/mod.rs:202 pub fn sink<'a>(&'a self) -> &'a Sink {
src/tokenizer/mod.rs:203 &self.sink
src/tokenizer/mod.rs:204 }
src/tokenizer/mod.rs:202:5: 204:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tokenizer/mod.rs:206:5: 208:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/tokenizer/mod.rs:206 pub fn sink_mut<'a>(&'a mut self) -> &'a mut Sink {
src/tokenizer/mod.rs:207 &mut self.sink
src/tokenizer/mod.rs:208 }
src/tokenizer/mod.rs:206:5: 208:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tokenizer/mod.rs:285:40: 285:54 warning: redundant closure found. Consider using `FromSet` in its place, #[warn(redundant_closure)] on by default
src/tokenizer/mod.rs:285 return self.get_char().map(|x| FromSet(x));
^~~~~~~~~~~~~~
src/tokenizer/mod.rs:285:40: 285:54 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#redundant_closure
src/tokenizer/mod.rs:291:67: 291:81 warning: redundant closure found. Consider using `FromSet` in its place, #[warn(redundant_closure)] on by default
src/tokenizer/mod.rs:291 Some(FromSet(c)) => self.get_preprocessed_char(c).map(|x| FromSet(x)),
^~~~~~~~~~~~~~
src/tokenizer/mod.rs:291:67: 291:81 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#redundant_closure
src/tokenizer/mod.rs:477:5: 482:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/tokenizer/mod.rs:477 fn doctype_id<'a>(&'a mut self, kind: DoctypeIdKind) -> &'a mut Option<StrTendril> {
src/tokenizer/mod.rs:478 match kind {
src/tokenizer/mod.rs:479 Public => &mut self.current_doctype.public_id,
src/tokenizer/mod.rs:480 System => &mut self.current_doctype.system_id,
src/tokenizer/mod.rs:481 }
src/tokenizer/mod.rs:482 }
src/tokenizer/mod.rs:477:5: 482:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tokenizer/mod.rs:1141:44: 1144:14 warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
src/tokenizer/mod.rs:1141 states::BogusDoctype => loop { match get_char!(self) {
src/tokenizer/mod.rs:1142 '>' => go!(self: emit_doctype; to Data),
src/tokenizer/mod.rs:1143 _ => (),
src/tokenizer/mod.rs:1144 }},
src/tokenizer/mod.rs:1141:44: 1144:14 help: try
if let '>' = get_char!(self) go!(self: emit_doctype; to Data)
for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
src/tokenizer/mod.rs:1160:21: 1164:22 warning: this if statement can be collapsed, #[warn(collapsible_if)] on by default
src/tokenizer/mod.rs:1160 if self.sink.adjusted_current_node_present_but_not_in_html_namespace() {
src/tokenizer/mod.rs:1161 if eat_exact!(self, "[CDATA[") {
src/tokenizer/mod.rs:1162 go!(self: clear_temp; to CdataSection);
src/tokenizer/mod.rs:1163 }
src/tokenizer/mod.rs:1164 }
src/tokenizer/mod.rs:1160:21: 1164:22 help: try
if (self.sink.adjusted_current_node_present_but_not_in_html_namespace()) && (eat_exact!(self, "[CDATA[")) {
go!(self: clear_temp; to CdataSection);
}
for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
src/tree_builder/tag_sets.rs:46:1: 46:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
src/tree_builder/tag_sets.rs:47:1: 47:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
src/tree_builder/tag_sets.rs:52:1: 52:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#inline_always
src/tree_builder/data.rs:95:5: 97:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/data.rs:99:5: 104:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/actions.rs:110:5: 110:90 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/actions.rs:147:5: 151:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/actions.rs:157:17: 160:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#match_ref_pats
src/tree_builder/actions.rs:252:9: 257:10 help: try
if (self.current_node_named(subject.clone())) && (self.position_in_active_formatting(&self.current_node()).is_none()) {
self.pop();
return;
}
for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
src/tree_builder/actions.rs:528:9: 538:10 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/tree_builder/actions.rs:608:37: 608:48 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#redundant_closure
src/tree_builder/actions.rs:884:12: 884:38 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#len_zero
src/tree_builder/rules.expanded.rs:36:5: 2592:6 help: You could split it up into multiple smaller functions
src/tree_builder/rules.expanded.rs:36 fn step(&mut self, mode: InsertionMode, token: Token) -> ProcessResult {
src/tree_builder/rules.expanded.rs:37 self.debug_step(mode, &token);
src/tree_builder/rules.expanded.rs:38 match mode {
src/tree_builder/rules.expanded.rs:39 Initial =>
src/tree_builder/rules.expanded.rs:40 match token {
src/tree_builder/rules.expanded.rs:41 CharacterTokens(NotSplit, text) => SplitWhitespace(text),
...
src/tree_builder/rules.expanded.rs:955:44: 955:56 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#redundant_closure
src/tree_builder/mod.rs:254:5: 256:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/mod.rs:258:5: 260:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/tree_builder/mod.rs:266:9: 268:10 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/tree_builder/mod.rs:269:9: 274:10 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/tree_builder/mod.rs:270:13: 273:14 help: try
if let &Element(ref h, _) = e { tracer.trace_handle(h.clone()) }
for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
src/tree_builder/mod.rs:270:13: 273:14 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#match_ref_pats
src/tree_builder/mod.rs:286:9: 292:10 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/tree_builder/mod.rs:295:9: 306:10 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/tree_builder/mod.rs:296:13: 305:14 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#match_ref_pats
src/serialize/mod.rs:91:5: 93:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src/serialize/mod.rs:91 fn parent<'a>(&'a mut self) -> &'a mut ElemInfo {
src/serialize/mod.rs:92 self.stack.last_mut().expect("no parent ElemInfo")
src/serialize/mod.rs:93 }
src/serialize/mod.rs:91:5: 93:6 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_lifetimes
src/rcdom.rs:212:9: 218:10 warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
src/rcdom.rs:212 match child {
src/rcdom.rs:213 AppendText(ref text) => match parent.borrow().children.last() {
src/rcdom.rs:214 Some(h) => if append_to_existing_text(h, &text) { return; },
src/rcdom.rs:215 _ => (),
src/rcdom.rs:216 },
src/rcdom.rs:217 _ => (),
...
src/rcdom.rs:212:9: 218:10 help: try
if let AppendText(ref text) = child { match parent.borrow().children.last() {
Some(h) => if append_to_existing_text(h, &text) { return; },
_ => (),
} }
for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
src/rcdom.rs:213:37: 216:14 warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let`, #[warn(single_match)] on by default
src/rcdom.rs:213 AppendText(ref text) => match parent.borrow().children.last() {
src/rcdom.rs:214 Some(h) => if append_to_existing_text(h, &text) { return; },
src/rcdom.rs:215 _ => (),
src/rcdom.rs:216 },
src/rcdom.rs:213:37: 216:14 help: try
if let Some(h) = parent.borrow().children.last() { if append_to_existing_text(h, &text) { return; } }
for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
src/rcdom.rs:337:17: 339:18 warning: it is more idiomatic to loop over `&node.children` instead of `node.children.iter()`, #[warn(explicit_iter_loop)] on by default
src/rcdom.rs:337 for handle in node.children.iter() {
src/rcdom.rs:338 try!(handle.clone().serialize(serializer, IncludeNode));
src/rcdom.rs:339 }
src/rcdom.rs:337:17: 339:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop
src/rcdom.rs:348:17: 350:18 warning: it is more idiomatic to loop over `&node.children` instead of `node.children.iter()`, #[warn(explicit_iter_loop)] on by default
src/rcdom.rs:348 for handle in node.children.iter() {
src/rcdom.rs:349 try!(handle.clone().serialize(serializer, IncludeNode));
src/rcdom.rs:350 }
src/rcdom.rs:348:17: 350:18 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop