abonander / anterofit

Strongly typed, asynchronous REST client framework for Rust.
Apache License 2.0
135 stars 13 forks source link

clippy lints #8

Closed little-dude closed 7 years ago

little-dude commented 7 years ago

Here are a few fixes for lints suggested by clippy. I split it into multiple small commits in case there are things you disagree with.

The only one I'm not really sure about is a9d6f0a. It looks alright judging from the multipart doc, and I suppose rustc would complain if it was not.

Btw there is still a warning:

warning: use of deprecated item: renamed to `send`, #[warn(deprecated)] on by default
   --> src/net/call.rs:176:16
    |
176 |             tx.complete(res);
    |                ^^^^^^^^

A simple fix is to replace it with tx.send(res), but then I was not sure how to handle the result (wether it should panic or not), so I left it.

abonander commented 7 years ago

Go ahead and make it let _ = tx.send(res);. It's perfectly normal for the receiving end to be dropped.

little-dude commented 7 years ago

Thanks for your comments. It should be good now :)

abonander commented 7 years ago

Thanks for the hard work! I'll be working on the StreamField thing.