Align clippy lints

Lints in `main.rs` are not used if there is a `lib.rs` file.
This commit is contained in:
Franck Royer 2020-12-23 14:33:29 +11:00
parent ece689f5ca
commit cdf2800fa5
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
11 changed files with 28 additions and 4 deletions

View file

@ -1,3 +1,16 @@
#![warn(
unused_extern_crates,
missing_debug_implementations,
missing_copy_implementations,
rust_2018_idioms,
clippy::cast_possible_truncation,
clippy::cast_sign_loss,
clippy::fallible_impl_from,
clippy::cast_precision_loss,
clippy::cast_possible_wrap,
clippy::dbg_macro
)]
#![forbid(unsafe_code)]
#![allow(non_snake_case)]
use ::serde::{Deserialize, Serialize};
@ -42,7 +55,7 @@ pub struct SwapAmounts {
// TODO: Display in XMR and BTC (not picos and sats).
impl Display for SwapAmounts {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{} sats for {} piconeros",