diff options
author | Alex Crichton <alex@alexcrichton.com> | 2019-08-20 14:51:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 14:51:26 -0500 |
commit | 4951dc400c1beda4cba25fe72d733a24758063f7 (patch) | |
tree | 2b79e4c97e1d8885b0c6209be702f4a17bd09333 /src/spanned.rs | |
parent | 8f4372873ec3964b458fa40c906832936f9074a8 (diff) | |
parent | 022e914ccf9ae0ed61e5fd09152b41f37737602a (diff) | |
download | milf-rs-4951dc400c1beda4cba25fe72d733a24758063f7.tar.gz milf-rs-4951dc400c1beda4cba25fe72d733a24758063f7.zip |
Merge pull request #321 from NickHackman/fix-clippy-warnings-and-errors
Fix clippy warnings and errors
Diffstat (limited to 'src/spanned.rs')
-rw-r--r-- | src/spanned.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/spanned.rs b/src/spanned.rs index d9fec3a..f2fc180 100644 --- a/src/spanned.rs +++ b/src/spanned.rs @@ -2,13 +2,13 @@ use serde::{de, ser}; use std::fmt; #[doc(hidden)] -pub const NAME: &'static str = "$__toml_private_Spanned"; +pub const NAME: &str = "$__toml_private_Spanned"; #[doc(hidden)] -pub const START: &'static str = "$__toml_private_start"; +pub const START: &str = "$__toml_private_start"; #[doc(hidden)] -pub const END: &'static str = "$__toml_private_end"; +pub const END: &str = "$__toml_private_end"; #[doc(hidden)] -pub const VALUE: &'static str = "$__toml_private_value"; +pub const VALUE: &str = "$__toml_private_value"; /// A spanned value, indicating the range at which it is defined in the source. /// @@ -116,17 +116,13 @@ where let value: T = visitor.next_value()?; - Ok(Spanned { - start: start, - end: end, - value: value, - }) + Ok(Spanned { start, end, value }) } } let visitor = SpannedVisitor(::std::marker::PhantomData); - static FIELDS: [&'static str; 3] = [START, END, VALUE]; + static FIELDS: [&str; 3] = [START, END, VALUE]; deserializer.deserialize_struct(NAME, &FIELDS, visitor) } } |