Commit Graph

947 Commits

Author SHA1 Message Date
David Tolnay 3c681651e1
Add test of Number parsing 2023-07-17 16:16:36 -07:00
David Tolnay 610d7b290d
Implement FromStr for serde_yaml::Number 2023-07-17 16:11:25 -07:00
David Tolnay 6b212e08b3
Release 0.9.23 2023-07-15 14:10:14 -07:00
David Tolnay cc83b0a220
Opt in to generate-link-to-definition when building on docs.rs 2023-07-15 14:09:57 -07:00
David Tolnay 954e38428c
Make minimal-versions job consistent with other repos 2023-07-04 10:09:02 -07:00
David Tolnay 060eb8669c
Release 0.9.22 2023-06-23 20:30:38 -07:00
David Tolnay b12ad38d63
Merge pull request #377 from dtolnay/indexmap
Update indexmap dependency to version 2
2023-06-23 20:28:19 -07:00
David Tolnay c418ad56c3
Update indexmap dependency to version 2 2023-06-23 20:22:02 -07:00
David Tolnay f1cd9e6b7f
Remove .clippy.toml in favor of respecting rust-version from Cargo.toml 2023-06-15 19:01:44 -07:00
David Tolnay 147103c4f4
Show error details during miri setup in CI
Without this, if it fails, the only information printed is useless:

    Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)...
    fatal error: failed to build sysroot; run `cargo miri setup` to see the error details
2023-05-23 08:29:46 -07:00
David Tolnay 622553f382
Fix unused import warnings in test under cfg miri
error: unused imports: `SeqAccess`, `Visitor`
     --> tests/test_error.rs:4:30
      |
    4 | use serde:🇩🇪:{Deserialize, SeqAccess, Visitor};
      |                              ^^^^^^^^^  ^^^^^^^
      |
      = note: `-D unused-imports` implied by `-D warnings`

    error: unused import: `std::collections::BTreeMap`
     --> tests/test_error.rs:8:5
      |
    8 | use std::collections::BTreeMap;
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

    error: unused import: `self`
     --> tests/test_error.rs:9:16
      |
    9 | use std::fmt::{self, Debug};
      |                ^^^^

    error: miri cannot be run on programs that fail compilation
2023-05-12 08:38:08 -07:00
David Tolnay 2037c7e62b
Fix new unused_mut detected by nightly-2023-04-30
warning: variable does not need to be mutable
       --> src/ser.rs:464:22
        |
    464 |     fn serialize_map(mut self, len: Option<usize>) -> Result<Self::SerializeMap> {
        |                      ----^^^^
        |                      |
        |                      help: remove this `mut`
        |
        = note: `#[warn(unused_mut)]` on by default
2023-04-29 20:10:37 -07:00
David Tolnay 8057faddd6
Release 0.9.21 2023-04-05 22:40:09 -07:00
David Tolnay 19a7bd3d9b
Merge pull request #371 from dtolnay/emptytag
Fix deserialization of tag `!<%21>`
2023-04-05 19:26:57 -07:00
David Tolnay ebb4b7af3a
Fix deserialization of tag !<%21> 2023-04-05 19:06:07 -07:00
David Tolnay 879a57fe91
Factor out conversion function from libyaml Tag to tag string 2023-04-05 19:05:19 -07:00
David Tolnay e3b9a02a13
Merge pull request #370 from dtolnay/emptytag
Treat Tag::new("!") as tag %21, instead of empty tag
2023-04-05 18:56:46 -07:00
David Tolnay ef435495d1
Treat Tag::new("!") as tag %21, instead of empty tag 2023-04-05 18:50:28 -07:00
David Tolnay 221154cc1b
Merge pull request #369 from dtolnay/emptytag
Reuse Tag visitor in Value's Deserialize impl
2023-04-05 18:50:04 -07:00
David Tolnay 39a866c695
Reuse Tag visitor in Value's Deserialize impl 2023-04-05 18:46:08 -07:00
David Tolnay 80e53a5166
Merge pull request #368 from dtolnay/emptytag
Preserve location information better when parsing invalid tag
2023-04-05 18:42:36 -07:00
David Tolnay f668f71ea4
Preserve location information better when parsing invalid tag 2023-04-05 18:39:36 -07:00
David Tolnay 63a62a741d
Merge pull request #367 from dtolnay/emptytag
Check for empty string before constructing Tag
2023-04-05 18:39:16 -07:00
David Tolnay 1047a2246c
Check for empty string before constructing Tag 2023-04-05 18:32:58 -07:00
David Tolnay a1597f145b
Merge pull request #366 from dtolnay/emptytag
Reject empty string in Tag::new
2023-04-05 18:27:46 -07:00
David Tolnay c1ea51c92b
Reject empty string in Tag::new 2023-04-05 18:24:19 -07:00
David Tolnay f833329ea3
Release 0.9.20 2023-04-05 15:15:07 -07:00
David Tolnay 2a25cb7ee9
Merge pull request #365 from dtolnay/empty
Allow empty document to be deserialized using visit_none
2023-04-05 15:13:41 -07:00
David Tolnay 0d98534dda
Allow empty document to be deserialized using visit_none 2023-04-05 15:10:25 -07:00
David Tolnay c4ac687cee
Add test of deserializing empty document to Option 2023-04-05 15:10:25 -07:00
David Tolnay 8353dbfc7f
Ignore similar_names pedantic clippy lint
error: binding's name is too similar to existing binding
      --> tests/test_de.rs:30:13
       |
    30 |     let mut deserializer = Deserializer::from_str(yaml);
       |             ^^^^^^^^^^^^
       |
    note: existing binding defined here
      --> tests/test_de.rs:18:9
       |
    18 |     let deserialized: T = serde_yaml::from_str(yaml).unwrap();
       |         ^^^^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
       = note: `-D clippy::similar-names` implied by `-D clippy::pedantic`
2023-04-05 15:10:11 -07:00
David Tolnay 234272f9d1
Update test_de to test multi-document mode 2023-04-05 15:04:35 -07:00
David Tolnay 69b5272bb0
Update test_error to test same errors in multi-document mode 2023-04-05 15:01:53 -07:00
David Tolnay 48fc779b90
Update fuzz crate gitignore to ignore coverage dir 2023-03-25 21:35:20 -07:00
David Tolnay 4e1cbd8d2f
Release 0.9.19 2023-03-05 13:17:07 -08:00
David Tolnay f351fc7a12
Merge pull request #360 from dtolnay/errorsource
Fix message duplication between error Display and source()
2023-03-05 13:16:38 -08:00
David Tolnay f27e4c5da3
Fix message duplication between error Display and source() 2023-03-05 13:12:29 -08:00
David Tolnay fc039c6357
Refer to std::error::Error trait as StdError
This avoids importing std::error the module, to avoid confusion
with crate::error.
2023-03-05 13:11:29 -08:00
David Tolnay 7f1db12843
Release 0.9.18 2023-03-04 17:28:54 -08:00
David Tolnay 248d6de914
Merge pull request #358 from dtolnay/unicode
Adding support for emitting Unicode characters over codepoint U+FFFF
2023-03-04 17:28:27 -08:00
David Tolnay 779f01676b
Update U+1F389 test 2023-03-04 17:25:40 -08:00
David Tolnay 12b48b5547
Pull in Unicode high codepoints fix from unsafe-libyaml 0.2.7 2023-03-04 17:25:40 -08:00
David Tolnay b6f69579df
Add test of Unicode larger than U+FFFF 2023-03-04 17:25:40 -08:00
David Tolnay eac69a2a0b
Merge pull request #357 from dtolnay/stringescape
Add test of escape sequences in strings
2023-03-04 17:25:30 -08:00
David Tolnay 08b8aa725e
Add test of escape sequences in strings 2023-03-04 17:22:32 -08:00
David Tolnay 73bf2c3df7
Ignore let_underscore_untyped pedantic clippy lint
error: non-binding `let` without a type annotation
      --> src/libyaml/util.rs:46:9
       |
    46 |         let _ = unsafe { Box::from_raw(self.ptr.as_ptr()) };
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider adding a type annotation or removing the `let` keyword
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_untyped
       = note: `-D clippy::let-underscore-untyped` implied by `-D clippy::pedantic`
2023-02-26 22:57:11 -07:00
David Tolnay 68a9e95c9f
Enable type layout randomization in CI on nightly 2023-02-19 09:21:59 -08:00
David Tolnay bd3ebb1bc9
Support a manual trigger on CI workflow 2023-02-18 17:23:56 -08:00
David Tolnay d7588e1e14
Update indoc dev-dependency to version 2 2023-01-29 14:34:15 -08:00
David Tolnay 1cf6e8ebde
Release 0.9.17 2023-01-19 19:22:47 -08:00