Skip to content

Commit 8472192

Browse files
committed
Resolve clippy items_after_statements lint
error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:1876:9 | 1876 | / impl<'de> Deserialize<'de> for Field { 1877 | | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 1878 | | where 1879 | | D: Deserializer<'de>, ... | 1917 | | } 1918 | | } | |_________^ | note: the lint level is defined here --> serde/src/lib.rs:95:52 | 95 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))] | ^^^^^^^^^^^^^^^ = note: `#[deny(clippy::items_after_statements)]` implied by `#[deny(clippy::pedantic)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:1920:9 | 1920 | struct DurationVisitor; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:1922:9 | 1922 | / impl<'de> Visitor<'de> for DurationVisitor { 1923 | | type Value = Duration; 1924 | | 1925 | | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { ... | 1979 | | } 1980 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:1982:9 | 1982 | const FIELDS: &'static [&'static str] = &["secs", "nanos"]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:2001:9 | 2001 | / impl<'de> Deserialize<'de> for Field { 2002 | | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 2003 | | where 2004 | | D: Deserializer<'de>, ... | 2042 | | } 2043 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:2045:9 | 2045 | struct DurationVisitor; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:2047:9 | 2047 | / impl<'de> Visitor<'de> for DurationVisitor { 2048 | | type Value = Duration; 2049 | | 2050 | | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { ... | 2108 | | } 2109 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements error: adding items after statements is confusing, since items exist from the start of the scope --> serde/src/de/impls.rs:2111:9 | 2111 | const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
1 parent 192c781 commit 8472192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serde/src/de/impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,7 @@ impl<'de> Deserialize<'de> for Duration {
18711871
enum Field {
18721872
Secs,
18731873
Nanos,
1874-
};
1874+
}
18751875

18761876
impl<'de> Deserialize<'de> for Field {
18771877
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
@@ -1996,7 +1996,7 @@ impl<'de> Deserialize<'de> for SystemTime {
19961996
enum Field {
19971997
Secs,
19981998
Nanos,
1999-
};
1999+
}
20002000

20012001
impl<'de> Deserialize<'de> for Field {
20022002
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>

0 commit comments

Comments
 (0)