From 0d1699e0e0bc9052be0a74b1b3f3d3eeeec39e3e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 16 Sep 2020 10:13:25 +0800 Subject: [PATCH] Finish removal of rust 2018 idioms --- git-object/src/borrowed/id.rs | 2 +- git-tui/src/main.rs | 1 + git-url/src/lib.rs | 1 + gitoxide-core/src/lib.rs | 1 + src/plumbing-cli.rs | 1 + src/porcelain-cli.rs | 1 + tasks.md | 2 +- 7 files changed, 7 insertions(+), 2 deletions(-) diff --git a/git-object/src/borrowed/id.rs b/git-object/src/borrowed/id.rs index 47c9bb42a9d..22dafa7e5ca 100644 --- a/git-object/src/borrowed/id.rs +++ b/git-object/src/borrowed/id.rs @@ -64,7 +64,7 @@ impl<'de: 'a, 'a> serde::Deserialize<'de> for Id<'a> { } impl<'de: 'a, 'a> serde::de::Visitor<'de> for __Visitor<'de, 'a> { type Value = Id<'a>; - fn expecting(&self, __formatter: &mut serde::export::Formatter) -> serde::export::fmt::Result { + fn expecting(&self, __formatter: &mut serde::export::Formatter<'_>) -> serde::export::fmt::Result { serde::export::Formatter::write_str(__formatter, "tuple struct Id") } #[inline] diff --git a/git-tui/src/main.rs b/git-tui/src/main.rs index 77d20c3bc3c..37876d089c9 100644 --- a/git-tui/src/main.rs +++ b/git-tui/src/main.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![deny(rust_2018_idioms)] fn main() { unimplemented!(); diff --git a/git-url/src/lib.rs b/git-url/src/lib.rs index 2ce8a327631..90a3a78f225 100644 --- a/git-url/src/lib.rs +++ b/git-url/src/lib.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![deny(rust_2018_idioms)] use std::{convert::TryFrom, fmt}; diff --git a/gitoxide-core/src/lib.rs b/gitoxide-core/src/lib.rs index dc492de9cea..2f7ed60ce13 100644 --- a/gitoxide-core/src/lib.rs +++ b/gitoxide-core/src/lib.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![deny(rust_2018_idioms)] use std::str::FromStr; diff --git a/src/plumbing-cli.rs b/src/plumbing-cli.rs index f50b41644e2..2a28df67012 100644 --- a/src/plumbing-cli.rs +++ b/src/plumbing-cli.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![deny(rust_2018_idioms)] mod plumbing; mod shared; diff --git a/src/porcelain-cli.rs b/src/porcelain-cli.rs index 6e7ad934046..612ca1f855e 100644 --- a/src/porcelain-cli.rs +++ b/src/porcelain-cli.rs @@ -1,4 +1,5 @@ #![forbid(unsafe_code)] +#![deny(rust_2018_idioms)] mod porcelain; diff --git a/tasks.md b/tasks.md index 9faa540e237..25da04a0072 100644 --- a/tasks.md +++ b/tasks.md @@ -6,7 +6,7 @@ * [x] locate object and figure out how to deal with differences of ODBs databases * [x] make NLL issue work * [ ] Nice access to compound::Object - * [ ] Add #![deny(rust_2018_idioms)] everywhere + * [x] Add #![deny(rust_2018_idioms)] everywhere * [ ] alternate DB (location - it's really must following the chain until a compound DB can be created) * [ ] loose upgrade: jwalk powered iteration behind a feature flag * **git-ref**