Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- warning: this `else { if .. }` block can be collapsed, #[warn(collapsible_if)] on by default
- --> src/protocol/binary.rs:98:16
- |
- 98 | } else {
- | ^
- |
- help: try
- | } else if self.strict {
- | // we're in strict mode however, and that always
- | // requires the protocol-version header to be written first
- | Err(::Error::Protocol(ProtocolError {
- | kind: ProtocolErrorKind::BadVersion,
- | message: format!("received bad version: {:?}", &first_bytes[0..2]),
- ...
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#collapsible_if
- warning: Consider removing unnecessary double parentheses, #[warn(double_parens)] on by default
- --> src/protocol/compact.rs:268:55
- |
- 268 | let val_type = try!(collection_u8_to_type((type_header & 0x0F)));
- | ^^^^^^^^^^^^^^^^^^^^
- warning: you should put `TStoredInputProtocol` between ticks in the documentation, #[warn(doc_markdown)] on by default
- --> src/protocol/stored.rs:40:30
- |
- 40 | /// Constructing and using a TStoredInputProtocol
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#doc_markdown
- warning: you should consider deriving a `Default` implementation for `protocol::binary::TBinaryInputProtocolFactory`, #[warn(new_without_default_derive)] on by default
- --> src/protocol/binary.rs:236:5
- |
- 236 | pub fn new() -> TBinaryInputProtocolFactory {
- | _____^ starting here...
- 237 | | TBinaryInputProtocolFactory {}
- 238 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TBinaryInputProtocolFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: you should consider deriving a `Default` implementation for `protocol::binary::TBinaryOutputProtocolFactory`, #[warn(new_without_default_derive)] on by default
- --> src/protocol/binary.rs:433:5
- |
- 433 | pub fn new() -> TBinaryOutputProtocolFactory {
- | _____^ starting here...
- 434 | | TBinaryOutputProtocolFactory {}
- 435 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TBinaryOutputProtocolFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: this `match` has identical arm bodies, #[warn(match_same_arms)] on by default
- --> src/protocol/binary.rs:455:24
- |
- 455 | TType::Utf7 => 0x0B,
- | ^^^^
- |
- note: same as this
- --> src/protocol/binary.rs:454:26
- |
- 454 | TType::String => 0x0B,
- | ^^^^
- note: consider refactoring into `TType::String | TType::Utf7`
- --> src/protocol/binary.rs:454:26
- |
- 454 | TType::String => 0x0B,
- | ^^^^
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#match_same_arms
- warning: you should consider deriving a `Default` implementation for `protocol::compact::TCompactInputProtocolFactory`, #[warn(new_without_default_derive)] on by default
- --> src/protocol/compact.rs:292:5
- |
- 292 | pub fn new() -> TCompactInputProtocolFactory {
- | _____^ starting here...
- 293 | | TCompactInputProtocolFactory {}
- 294 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TCompactInputProtocolFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: you should consider deriving a `Default` implementation for `protocol::compact::TCompactOutputProtocolFactory`, #[warn(new_without_default_derive)] on by default
- --> src/protocol/compact.rs:543:5
- |
- 543 | pub fn new() -> TCompactOutputProtocolFactory {
- | _____^ starting here...
- 544 | | TCompactOutputProtocolFactory {}
- 545 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TCompactOutputProtocolFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
- --> src/protocol/multiplexed.rs:76:49
- |
- 76 | _ => self.inner.write_message_begin(&identifier),
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
- warning: use of `ok_or` followed by a function call, #[warn(or_fun_call)] on by default
- --> src/protocol/stored.rs:97:9
- |
- 97 | self.message_ident.take().ok_or(::errors::new_protocol_error(ProtocolErrorKind::Unknown,
- | _________^ starting here...
- 98 | | "message identifier already \
- 99 | | read"))
- | |_____________________________________________________________________________^ ...ending here
- |
- help: try this
- | self.message_ident.take().ok_or_else(|| ::errors::new_protocol_error(ProtocolErrorKind::Unknown,
- | "message identifier already \
- | read"))
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#or_fun_call
- warning: use of `ok_or` followed by a function call, #[warn(or_fun_call)] on by default
- --> src/protocol/mod.rs:712:5
- |
- 712 | field_ident.id.ok_or(::Error::Protocol(::ProtocolError {
- | _____^ starting here...
- 713 | | kind: ::ProtocolErrorKind::Unknown,
- 714 | | message: format!("missing field in in {:?}", field_ident),
- 715 | | }))
- | |_______^ ...ending here
- |
- help: try this
- | field_ident.id.ok_or_else(|| ::Error::Protocol(::ProtocolError {
- | kind: ::ProtocolErrorKind::Unknown,
- | message: format!("missing field in in {:?}", field_ident),
- | }))
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#or_fun_call
- 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/server/simple.rs:150:13
- |
- 150 | match r {
- | _____________^ starting here...
- 151 | | Err(e) => {
- 152 | | warn!("processor failed with error: {:?}", e);
- 153 | | break; // FIXME: close here
- 154 | | }
- 155 | | Ok(_) => (),
- 156 | | }
- | |_____________^ ...ending here
- |
- help: try this
- | if let Err(e) = r {
- | warn!("processor failed with error: {:?}", e);
- | break; // FIXME: close here
- | }
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#single_match
- warning: usage of `contains_key` followed by `insert` on a `HashMap`, #[warn(map_entry)] on by default
- --> src/server/multiplexed.rs:45:9
- |
- 45 | if self.processors.contains_key(&name) {
- | _________^ starting here...
- 46 | | false
- 47 | | } else {
- 48 | | self.processors.insert(name, processor);
- 49 | | true
- 50 | | }
- | |_________^ ...ending here
- |
- help: consider using
- | self.processors.entry(name)
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#map_entry
- warning: you should consider deriving a `Default` implementation for `transport::buffered::TBufferedTransportFactory`, #[warn(new_without_default_derive)] on by default
- --> src/transport/buffered.rs:157:5
- |
- 157 | pub fn new() -> TBufferedTransportFactory {
- | _____^ starting here...
- 158 | | TBufferedTransportFactory {}
- 159 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TBufferedTransportFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
- --> src/transport/framed.rs:136:69
- |
- 136 | self.wbuf[self.wpos..(self.wpos + nwrite)].clone_from_slice(&b);
- | ^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
- warning: you should consider deriving a `Default` implementation for `transport::framed::TFramedTransportFactory`, #[warn(new_without_default_derive)] on by default
- --> src/transport/framed.rs:167:5
- |
- 167 | pub fn new() -> TFramedTransportFactory {
- | _____^ starting here...
- 168 | | TFramedTransportFactory {}
- 169 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TFramedTransportFactory;
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: you should consider deriving a `Default` implementation for `transport::socket::TTcpTransport`, #[warn(new_without_default_derive)] on by default
- --> src/transport/socket.rs:69:5
- |
- 69 | pub fn new() -> TTcpTransport {
- | _____^ starting here...
- 70 | | TTcpTransport { stream: None }
- 71 | | }
- | |_____^ ...ending here
- |
- help: try this
- | #[derive(Default)]
- | pub struct TTcpTransport {
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#new_without_default_derive
- warning: redundant pattern matching, consider using `is_some()`, #[warn(if_let_redundant_pattern_matching)] on by default
- --> src/transport/socket.rs:81:16
- |
- 81 | if let Some(_) = self.stream {
- | ^^^^^^^
- |
- help: try this
- | if self.stream.is_some() {
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#if_let_redundant_pattern_matching
- warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
- --> src/errors.rs:272:68
- |
- 272 | Error::Transport(ref e) => TransportError::description(&e),
- | ^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
- warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
- --> src/errors.rs:273:66
- |
- 273 | Error::Protocol(ref e) => ProtocolError::description(&e),
- | ^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
- warning: this expression borrows a reference that is immediately dereferenced by the compiler, #[warn(needless_borrow)] on by default
- --> src/errors.rs:274:72
- |
- 274 | Error::Application(ref e) => ApplicationError::description(&e),
- | ^^
- |
- = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_borrow
- Finished dev [unoptimized + debuginfo] target(s) in 2.13 secs
Advertisement
Add Comment
Please, Sign In to add comment