Compare commits

...

4 Commits

Author SHA1 Message Date
David Tolnay 4b622f6bbf Release 1.0.138 2022-07-01 20:09:56 -07:00
David Tolnay 0ee71c70af Ignore explicit_auto_deref clippy lint
error: deref which would be done by auto-deref
        --> serde/src/de/impls.rs:2014:59
         |
    2014 | ...                   Err(Error::unknown_field(&*value, FIELDS))
         |                                                 ^^^^^^ help: try this: `value`
         |
         = note: `-D clippy::explicit-auto-deref` implied by `-D clippy::all`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref

    error: deref which would be done by auto-deref
        --> serde/src/de/impls.rs:2354:55
         |
    2354 | ...                   Err(Error::unknown_field(&*value, FIELDS))
         |                                                 ^^^^^^ help: try this: `value`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
2022-07-01 19:41:14 -07:00
David Tolnay 6c098e497e Merge pull request #2240 from Kixunil/patch-1
Call `reserve()` in `DeserializeSeed` example
2022-06-30 09:39:25 -07:00
Martin Habovštiak 41ffa6df7e Call reserve() in DeserializeSeed example
This suggests calling `reserve()` in example code so that people who ~blindly copy it get faster code.
2022-06-30 18:28:52 +02:00
7 changed files with 13 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "1.0.137" # remember to update html_root_url and serde_derive dependency
version = "1.0.138" # remember to update html_root_url and serde_derive dependency
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
rust-version = "1.13"
license = "MIT OR Apache-2.0"
@@ -15,7 +15,7 @@ include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APAC
build = "build.rs"
[dependencies]
serde_derive = { version = "=1.0.137", optional = true, path = "../serde_derive" }
serde_derive = { version = "=1.0.138", optional = true, path = "../serde_derive" }
[dev-dependencies]
serde_derive = { version = "1.0", path = "../serde_derive" }
+5
View File
@@ -708,6 +708,11 @@ impl<T> DeserializeOwned for T where T: for<'de> Deserialize<'de> {}
/// where
/// A: SeqAccess<'de>,
/// {
/// // Decrease the number of reallocations if there are many elements
/// if let Some(size_hint) = seq.size_hint() {
/// self.0.reserve(size_hint);
/// }
///
/// // Visit each element in the inner array and push it onto
/// // the existing vector.
/// while let Some(elem) = seq.next_element()? {
+2 -1
View File
@@ -84,7 +84,7 @@
////////////////////////////////////////////////////////////////////////////////
// Serde types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/serde/1.0.137")]
#![doc(html_root_url = "https://docs.rs/serde/1.0.138")]
// Support using Serde without the standard library!
#![cfg_attr(not(feature = "std"), no_std)]
// Unstable functionality only if the user asks for it. For tracking and
@@ -120,6 +120,7 @@
// correctly used
derive_partial_eq_without_eq,
enum_glob_use,
explicit_auto_deref,
let_underscore_drop,
map_err_ignore,
result_unit_err,
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_derive"
version = "1.0.137" # remember to update html_root_url
version = "1.0.138" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
rust-version = "1.31"
license = "MIT OR Apache-2.0"
+1 -1
View File
@@ -13,7 +13,7 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.137")]
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.138")]
#![allow(unknown_lints, bare_trait_objects)]
// Ignored clippy lints
#![allow(
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_test"
version = "1.0.137" # remember to update html_root_url
version = "1.0.138" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
rust-version = "1.13"
license = "MIT OR Apache-2.0"
+1 -1
View File
@@ -144,7 +144,7 @@
//! # }
//! ```
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.137")]
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.138")]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
// Ignored clippy lints
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))]