Commit graph

353 commits

Author SHA1 Message Date
David Tolnay
4c5353846b
Remove 'remember to update' reminder from Cargo.toml 2023-10-17 21:05:31 -07:00
David Tolnay
eed18e0254
Test docs.rs documentation build in CI 2023-09-24 10:53:44 -07:00
David Tolnay
7bcf33fcfb
Update actions/checkout@v3 -> v4 2023-09-04 22:35:02 -07:00
David Tolnay
fcf075572b
Drop braces from fuzz closure
https://github.com/rust-fuzz/libfuzzer/pull/105
2023-08-10 19:21:01 -07:00
David Tolnay
80efa3fe84
Raise minimum tested compiler to 1.63
Required by socket2.

    error: package `socket2 v0.5.3` cannot be built because it requires
    rustc 1.63 or newer, while the currently active rustc version is 1.62.0
2023-08-09 22:36:43 -07:00
David Tolnay
1cc99387c4
Revert "Temporarily disable -Zrandomize-layout due to rustc ICE"
Fixed in nightly-2023-07-23.

This reverts commit aea9d0ce1b.
2023-07-22 18:41:57 -07:00
David Tolnay
aea9d0ce1b
Temporarily disable -Zrandomize-layout due to rustc ICE
https://github.com/rust-lang/rust/issues/113941
2023-07-21 20:22:43 -07:00
David Tolnay
9651508612
Release 0.2.9 2023-07-15 14:12:08 -07:00
David Tolnay
c0d1d540d1
Opt in to generate-link-to-definition when building on docs.rs 2023-07-15 14:11:57 -07:00
David Tolnay
202e66fb9d
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:47 -07:00
David Tolnay
712a45f788
Fix new unused_mut detected by nightly-2023-04-30
warning: variable does not need to be mutable
       --> src/api.rs:285:40
        |
    285 | pub unsafe fn yaml_parser_set_encoding(mut parser: *mut yaml_parser_t, encoding: yaml_encoding_t) {
        |                                        ----^^^^^^
        |                                        |
        |                                        help: remove this `mut`
        |
        = note: `#[warn(unused_mut)]` on by default

    warning: variable does not need to be mutable
       --> src/api.rs:295:39
        |
    295 | pub unsafe fn yaml_emitter_initialize(mut emitter: *mut yaml_emitter_t) -> Success {
        |                                       ----^^^^^^^
        |                                       |
        |                                       help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:388:5
        |
    388 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:427:5
        |
    427 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:437:42
        |
    437 | pub unsafe fn yaml_emitter_set_canonical(mut emitter: *mut yaml_emitter_t, canonical: bool) {
        |                                          ----^^^^^^^
        |                                          |
        |                                          help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:443:39
        |
    443 | pub unsafe fn yaml_emitter_set_indent(mut emitter: *mut yaml_emitter_t, indent: libc::c_int) {
        |                                       ----^^^^^^^
        |                                       |
        |                                       help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:449:38
        |
    449 | pub unsafe fn yaml_emitter_set_width(mut emitter: *mut yaml_emitter_t, width: libc::c_int) {
        |                                      ----^^^^^^^
        |                                      |
        |                                      help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:455:40
        |
    455 | pub unsafe fn yaml_emitter_set_unicode(mut emitter: *mut yaml_emitter_t, unicode: bool) {
        |                                        ----^^^^^^^
        |                                        |
        |                                        help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:461:38
        |
    461 | pub unsafe fn yaml_emitter_set_break(mut emitter: *mut yaml_emitter_t, line_break: yaml_break_t) {
        |                                      ----^^^^^^^
        |                                      |
        |                                      help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:555:5
        |
    555 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:577:48
        |
    577 | pub unsafe fn yaml_stream_end_event_initialize(mut event: *mut yaml_event_t) -> Success {
        |                                                ----^^^^^
        |                                                |
        |                                                help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:600:5
        |
    600 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:717:5
        |
    717 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:740:5
        |
    740 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:778:5
        |
    778 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:873:5
        |
    873 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:944:50
        |
    944 | pub unsafe fn yaml_sequence_end_event_initialize(mut event: *mut yaml_event_t) -> Success {
        |                                                  ----^^^^^
        |                                                  |
        |                                                  help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/api.rs:968:5
        |
    968 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/api.rs:1036:49
         |
    1036 | pub unsafe fn yaml_mapping_end_event_initialize(mut event: *mut yaml_event_t) -> Success {
         |                                                 ----^^^^^
         |                                                 |
         |                                                 help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/api.rs:1096:5
         |
    1096 |     mut document: *mut yaml_document_t,
         |     ----^^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/dumper.rs:19:33
       |
    19 | pub unsafe fn yaml_emitter_open(mut emitter: *mut yaml_emitter_t) -> Success {
       |                                 ----^^^^^^^
       |                                 |
       |                                 help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/dumper.rs:48:34
       |
    48 | pub unsafe fn yaml_emitter_close(mut emitter: *mut yaml_emitter_t) -> Success {
       |                                  ----^^^^^^^
       |                                  |
       |                                  help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/dumper.rs:168:52
        |
    168 | unsafe fn yaml_emitter_delete_document_and_anchors(mut emitter: *mut yaml_emitter_t) {
        |                                                    ----^^^^^^^
        |                                                    |
        |                                                    help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:116:5
        |
    116 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:132:5
        |
    132 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:191:5
        |
    191 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:224:5
        |
    224 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:292:5
        |
    292 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:335:5
        |
    335 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:549:5
        |
    549 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:557:5
        |
    557 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:601:5
        |
    601 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:678:5
        |
    678 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:774:5
        |
    774 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:813:5
        |
    813 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:848:5
        |
    848 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:887:5
        |
    887 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:924:5
        |
    924 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:949:5
        |
    949 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:965:5
        |
    965 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/emitter.rs:987:5
        |
    987 |     mut emitter: *mut yaml_emitter_t,
        |     ----^^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1009:5
         |
    1009 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1104:5
         |
    1104 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1356:5
         |
    1356 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1396:5
         |
    1396 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1439:5
         |
    1439 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1607:5
         |
    1607 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1702:37
         |
    1702 | unsafe fn yaml_emitter_write_indent(mut emitter: *mut yaml_emitter_t) -> Success {
         |                                     ----^^^^^^^
         |                                     |
         |                                     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1727:5
         |
    1727 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1751:5
         |
    1751 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1767:5
         |
    1767 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1788:5
         |
    1788 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1863:5
         |
    1863 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:1922:5
         |
    1922 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:2010:5
         |
    2010 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:2226:5
         |
    2226 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:2277:5
         |
    2277 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/emitter.rs:2326:5
         |
    2326 |     mut emitter: *mut yaml_emitter_t,
         |     ----^^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/loader.rs:38:5
       |
    38 |     mut parser: *mut yaml_parser_t,
       |     ----^^^^^^
       |     |
       |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/loader.rs:89:5
       |
    89 |     mut parser: *mut yaml_parser_t,
       |     ----^^^^^^
       |     |
       |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:101:5
        |
    101 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:125:5
        |
    125 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:151:34
        |
    151 | unsafe fn yaml_parser_load_nodes(mut parser: *mut yaml_parser_t, ctx: *mut loader_ctx) -> Success {
        |                                  ----^^^^^^
        |                                  |
        |                                  help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:204:5
        |
    204 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:244:5
        |
    244 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:267:21
        |
    267 |                 let mut p: *mut yaml_node_pair_t =
        |                     ----^
        |                     |
        |                     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:325:5
        |
    325 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:385:5
        |
    385 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/loader.rs:484:5
        |
    484 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/parser.rs:83:5
       |
    83 |     mut parser: *mut yaml_parser_t,
       |     ----^^^^^^
       |     |
       |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/parser.rs:94:5
       |
    94 |     mut parser: *mut yaml_parser_t,
       |     ----^^^^^^
       |     |
       |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:176:5
        |
    176 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:177:5
        |
    177 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:206:5
        |
    206 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:207:5
        |
    207 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:338:5
        |
    338 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:359:5
        |
    359 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:360:5
        |
    360 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:394:5
        |
    394 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:395:5
        |
    395 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:725:5
        |
    725 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:726:5
        |
    726 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:779:5
        |
    779 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:780:5
        |
    780 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:820:5
        |
    820 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:821:5
        |
    821 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:877:5
        |
    877 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:909:5
        |
    909 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:910:5
        |
    910 |     mut event: *mut yaml_event_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/parser.rs:980:5
        |
    980 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1005:5
         |
    1005 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1033:5
         |
    1033 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1034:5
         |
    1034 |     mut event: *mut yaml_event_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1053:5
         |
    1053 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1054:5
         |
    1054 |     mut event: *mut yaml_event_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1122:5
         |
    1122 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1152:5
         |
    1152 |     mut event: *mut yaml_event_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/parser.rs:1323:5
         |
    1323 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/reader.rs:11:5
       |
    11 |     mut parser: *mut yaml_parser_t,
       |     ----^^^^^^
       |     |
       |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/reader.rs:28:42
       |
    28 | unsafe fn yaml_parser_determine_encoding(mut parser: *mut yaml_parser_t) -> Success {
       |                                          ----^^^^^^
       |                                          |
       |                                          help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/reader.rs:94:41
       |
    94 | unsafe fn yaml_parser_update_raw_buffer(mut parser: *mut yaml_parser_t) -> Success {
       |                                         ----^^^^^^
       |                                         |
       |                                         help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:137:5
        |
    137 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:166:5
        |
    166 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:180:52
        |
    180 | pub(crate) unsafe fn yaml_parser_fetch_more_tokens(mut parser: *mut yaml_parser_t) -> Success {
        |                                                    ----^^^^^^
        |                                                    |
        |                                                    help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:383:9
        |
    383 |     let mut simple_key: *mut yaml_simple_key_t =
        |         ----^^^^^^^^^^
        |         |
        |         help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:400:43
        |
    400 | unsafe fn yaml_parser_increase_flow_level(mut parser: *mut yaml_parser_t) -> Success {
        |                                           ----^^^^^^
        |                                           |
        |                                           help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:430:5
        |
    430 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:469:37
        |
    469 | unsafe fn yaml_parser_unroll_indent(mut parser: *mut yaml_parser_t, column: ptrdiff_t) {
        |                                     ----^^^^^^
        |                                     |
        |                                     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:489:42
        |
    489 | unsafe fn yaml_parser_fetch_stream_start(mut parser: *mut yaml_parser_t) {
        |                                          ----^^^^^^
        |                                          |
        |                                          help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:518:40
        |
    518 | unsafe fn yaml_parser_fetch_stream_end(mut parser: *mut yaml_parser_t) -> Success {
        |                                        ----^^^^^^
        |                                        |
        |                                        help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:543:39
        |
    543 | unsafe fn yaml_parser_fetch_directive(mut parser: *mut yaml_parser_t) -> Success {
        |                                       ----^^^^^^
        |                                       |
        |                                       help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:559:5
        |
    559 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:587:5
        |
    587 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:615:5
        |
    615 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:640:40
        |
    640 | unsafe fn yaml_parser_fetch_flow_entry(mut parser: *mut yaml_parser_t) -> Success {
        |                                        ----^^^^^^
        |                                        |
        |                                        help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:662:41
        |
    662 | unsafe fn yaml_parser_fetch_block_entry(mut parser: *mut yaml_parser_t) -> Success {
        |                                         ----^^^^^^
        |                                         |
        |                                         help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:707:33
        |
    707 | unsafe fn yaml_parser_fetch_key(mut parser: *mut yaml_parser_t) -> Success {
        |                                 ----^^^^^^
        |                                 |
        |                                 help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:752:35
        |
    752 | unsafe fn yaml_parser_fetch_value(mut parser: *mut yaml_parser_t) -> Success {
        |                                   ----^^^^^^
        |                                   |
        |                                   help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:755:9
        |
    755 |     let mut simple_key: *mut yaml_simple_key_t =
        |         ----^^^^^^^^^^
        |         |
        |         help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:826:5
        |
    826 |     mut parser: *mut yaml_parser_t,
        |     ----^^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:842:33
        |
    842 | unsafe fn yaml_parser_fetch_tag(mut parser: *mut yaml_parser_t) -> Success {
        |                                 ----^^^^^^
        |                                 |
        |                                 help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:856:42
        |
    856 | unsafe fn yaml_parser_fetch_block_scalar(mut parser: *mut yaml_parser_t, literal: bool) -> Success {
        |                                          ----^^^^^^
        |                                          |
        |                                          help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:870:41
        |
    870 | unsafe fn yaml_parser_fetch_flow_scalar(mut parser: *mut yaml_parser_t, single: bool) -> Success {
        |                                         ----^^^^^^
        |                                         |
        |                                         help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:884:42
        |
    884 | unsafe fn yaml_parser_fetch_plain_scalar(mut parser: *mut yaml_parser_t) -> Success {
        |                                          ----^^^^^^
        |                                          |
        |                                          help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:898:42
        |
    898 | unsafe fn yaml_parser_scan_to_next_token(mut parser: *mut yaml_parser_t) -> Success {
        |                                          ----^^^^^^
        |                                          |
        |                                          help: remove this `mut`

    warning: variable does not need to be mutable
       --> src/scanner.rs:942:5
        |
    942 |     mut token: *mut yaml_token_t,
        |     ----^^^^^
        |     |
        |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:1309:5
         |
    1309 |     mut token: *mut yaml_token_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:1390:5
         |
    1390 |     mut token: *mut yaml_token_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:1779:5
         |
    1779 |     mut token: *mut yaml_token_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:2089:5
         |
    2089 |     mut token: *mut yaml_token_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:2493:5
         |
    2493 |     mut parser: *mut yaml_parser_t,
         |     ----^^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
        --> src/scanner.rs:2494:5
         |
    2494 |     mut token: *mut yaml_token_t,
         |     ----^^^^^
         |     |
         |     help: remove this `mut`

    warning: variable does not need to be mutable
      --> src/writer.rs:10:5
       |
    10 |     mut emitter: *mut yaml_emitter_t,
       |     ----^^^^^^^
       |     |
       |     help: remove this `mut`
2023-04-29 20:15:50 -07:00
David Tolnay
502c9841b2
Release 0.2.8 2023-04-05 22:37:31 -07:00
David Tolnay
cc4e122f71
Replace literals that came from INT_MAX 2023-04-05 22:18:48 -07:00
David Tolnay
f910bba839
Delete YAML_MEMORY_ERROR codepaths 2023-04-05 22:15:48 -07:00
David Tolnay
92020b5786
Match how libyaml's emitter matches characters for escaping 2023-04-05 15:37:17 -07:00
David Tolnay
d75d3e8187
Byte literal escape characters in scanner 2023-04-05 15:34:12 -07:00
David Tolnay
13e7a86d98
Adopt bool for some variables which can only be 0 or 1 2023-04-05 15:26:44 -07:00
David Tolnay
e8de6ca761
Update fuzz crate gitignore to ignore coverage dir 2023-03-25 21:35:20 -07:00
David Tolnay
222f27a206
Release 0.2.7 2023-03-04 17:07:49 -08:00
David Tolnay
1cb5fa0546
Merge pull request #20 from dtolnay/unicode
Adding support for emitting Unicode characters over codepoint U+FFFF
2023-03-04 17:04:41 -08:00
David Tolnay
6519d6746e
Adding support for emitting Unicode characters over codepoint U+FFFF
Previously the Rust string "\u{1F389}" would get emitted as the YAML
double quoted scalar "\U0001F389". Now it will be serialized as "🎉".
2023-03-04 16:49:45 -08:00
David Tolnay
71bcccd783
Merge pull request #19 from dtolnay/printable
Reimplement IS_PRINTABLE using nested matches
2023-03-04 16:45:54 -08:00
David Tolnay
d20cc3dd06
Reimplement IS_PRINTABLE using nested matches 2023-03-04 16:39:53 -08:00
David Tolnay
c58cdecd5b
Remove excessive parenthesization from some macro implementations 2023-03-04 16:16:06 -08:00
David Tolnay
525c061e88
Release 0.2.6 2023-03-03 15:27:04 -08:00
David Tolnay
2d2da60a47
Ignore let_underscore_untyped pedantic clippy lint
warning: non-binding `let` without a type annotation
       --> src/lib.rs:227:13
        |
    227 |             let _ = Write::write_fmt(self, args);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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: the lint level is defined here
       --> src/lib.rs:10:9
        |
    10  | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::let_underscore_untyped)]` implied by `#[warn(clippy::pedantic)]`

    warning: non-binding `let` without a type annotation
      --> src/emitter.rs:92:9
       |
    92 |         let _ = PUT_BREAK(emitter);
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
       --> src/loader.rs:479:5
        |
    479 |     let _ = POP!(*ctx);
        |     ^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/loader.rs:577:5
        |
    577 |     let _ = POP!(*ctx);
        |     ^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/parser.rs:756:9
        |
    756 |         let _ = POP!((*parser).marks);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/parser.rs:854:9
        |
    854 |         let _ = POP!((*parser).marks);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/parser.rs:967:5
        |
    967 |     let _ = POP!((*parser).marks);
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
        --> src/parser.rs:1109:5
         |
    1109 |     let _ = POP!((*parser).marks);
         |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = 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

    warning: non-binding `let` without a type annotation
       --> src/scanner.rs:425:9
        |
    425 |         let _ = POP!((*parser).simple_keys);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:71:17
       |
    71 | /                 let _ = write!(
    72 | |                     error,
    73 | |                     "\nLine: {} Column: {}",
    74 | |                     ((*parser).problem_mark.line).wrapping_add(1_u64),
    75 | |                     ((*parser).problem_mark.column).wrapping_add(1_u64),
    76 | |                 );
       | |__________________^
       |
       = 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: the lint level is defined here
      --> src/bin/run-parser-test-suite.rs:1:9
       |
    1  | #![warn(clippy::pedantic)]
       |         ^^^^^^^^^^^^^^^^
       = note: `#[warn(clippy::let_underscore_untyped)]` implied by `#[warn(clippy::pedantic)]`

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:84:13
       |
    84 |             let _ = writeln!(stdout, "???");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:86:13
       |
    86 |             let _ = writeln!(stdout, "+STR");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:88:13
       |
    88 |             let _ = writeln!(stdout, "-STR");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:90:13
       |
    90 |             let _ = write!(stdout, "+DOC");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:92:17
       |
    92 |                 let _ = write!(stdout, " ---");
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:94:13
       |
    94 |             let _ = writeln!(stdout);
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:96:13
       |
    96 |             let _ = write!(stdout, "-DOC");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:98:17
       |
    98 |                 let _ = write!(stdout, " ...");
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs💯13
        |
    100 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:102:13
        |
    102 |             let _ = write!(stdout, "+MAP");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:104:17
        |
    104 | /                 let _ = write!(
    105 | |                     stdout,
    106 | |                     " &{}",
    107 | |                     CStr::from_ptr((*event).data.mapping_start.anchor as *const i8),
    108 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:111:17
        |
    111 | /                 let _ = write!(
    112 | |                     stdout,
    113 | |                     " <{}>",
    114 | |                     CStr::from_ptr((*event).data.mapping_start.tag as *const i8),
    115 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:117:13
        |
    117 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:119:13
        |
    119 |             let _ = writeln!(stdout, "-MAP");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:121:13
        |
    121 |             let _ = write!(stdout, "+SEQ");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:123:17
        |
    123 | /                 let _ = write!(
    124 | |                     stdout,
    125 | |                     " &{}",
    126 | |                     CStr::from_ptr((*event).data.sequence_start.anchor as *const i8),
    127 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:130:17
        |
    130 | /                 let _ = write!(
    131 | |                     stdout,
    132 | |                     " <{}>",
    133 | |                     CStr::from_ptr((*event).data.sequence_start.tag as *const i8),
    134 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:136:13
        |
    136 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:138:13
        |
    138 |             let _ = writeln!(stdout, "-SEQ");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:140:13
        |
    140 |             let _ = write!(stdout, "=VAL");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:142:17
        |
    142 | /                 let _ = write!(
    143 | |                     stdout,
    144 | |                     " &{}",
    145 | |                     CStr::from_ptr((*event).data.scalar.anchor as *const i8),
    146 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:149:17
        |
    149 | /                 let _ = write!(
    150 | |                     stdout,
    151 | |                     " <{}>",
    152 | |                     CStr::from_ptr((*event).data.scalar.tag as *const i8),
    153 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:155:13
        |
    155 | /             let _ = stdout.write_all(match (*event).data.scalar.style {
    156 | |                 YAML_PLAIN_SCALAR_STYLE => b" :",
    157 | |                 YAML_SINGLE_QUOTED_SCALAR_STYLE => b" '",
    158 | |                 YAML_DOUBLE_QUOTED_SCALAR_STYLE => b" \"",
    ...   |
    161 | |                 _ => process::abort(),
    162 | |             });
        | |_______________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:168:13
        |
    168 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:170:13
        |
    170 | /             let _ = writeln!(
    171 | |                 stdout,
    172 | |                 "=ALI *{}",
    173 | |                 CStr::from_ptr((*event).data.alias.anchor as *const i8),
    174 | |             );
        | |______________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:200:9
        |
    200 |         let _ = stdout.write_all(repr);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:208:9
        |
    208 |         let _ = writeln!(io::stderr(), "Usage: run-parser-test-suite <in.yaml>...");
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:216:13
        |
    216 |             let _ = writeln!(io::stderr(), "{}", err);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:71:17
       |
    71 | /                 let _ = write!(
    72 | |                     error,
    73 | |                     "\nLine: {} Column: {}",
    74 | |                     ((*parser).problem_mark.line).wrapping_add(1_u64),
    75 | |                     ((*parser).problem_mark.column).wrapping_add(1_u64),
    76 | |                 );
       | |__________________^
       |
       = 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: the lint level is defined here
      --> src/bin/run-parser-test-suite.rs:1:9
       |
    1  | #![warn(clippy::pedantic)]
       |         ^^^^^^^^^^^^^^^^
       = note: `#[warn(clippy::let_underscore_untyped)]` implied by `#[warn(clippy::pedantic)]`

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:84:13
       |
    84 |             let _ = writeln!(stdout, "???");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:86:13
       |
    86 |             let _ = writeln!(stdout, "+STR");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:88:13
       |
    88 |             let _ = writeln!(stdout, "-STR");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:90:13
       |
    90 |             let _ = write!(stdout, "+DOC");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:92:17
       |
    92 |                 let _ = write!(stdout, " ---");
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:94:13
       |
    94 |             let _ = writeln!(stdout);
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:96:13
       |
    96 |             let _ = write!(stdout, "-DOC");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
      --> src/bin/run-parser-test-suite.rs:98:17
       |
    98 |                 let _ = write!(stdout, " ...");
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs💯13
        |
    100 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:102:13
        |
    102 |             let _ = write!(stdout, "+MAP");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:104:17
        |
    104 | /                 let _ = write!(
    105 | |                     stdout,
    106 | |                     " &{}",
    107 | |                     CStr::from_ptr((*event).data.mapping_start.anchor as *const i8),
    108 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:111:17
        |
    111 | /                 let _ = write!(
    112 | |                     stdout,
    113 | |                     " <{}>",
    114 | |                     CStr::from_ptr((*event).data.mapping_start.tag as *const i8),
    115 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:117:13
        |
    117 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:119:13
        |
    119 |             let _ = writeln!(stdout, "-MAP");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:121:13
        |
    121 |             let _ = write!(stdout, "+SEQ");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:123:17
        |
    123 | /                 let _ = write!(
    124 | |                     stdout,
    125 | |                     " &{}",
    126 | |                     CStr::from_ptr((*event).data.sequence_start.anchor as *const i8),
    127 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:130:17
        |
    130 | /                 let _ = write!(
    131 | |                     stdout,
    132 | |                     " <{}>",
    133 | |                     CStr::from_ptr((*event).data.sequence_start.tag as *const i8),
    134 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:136:13
        |
    136 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:138:13
        |
    138 |             let _ = writeln!(stdout, "-SEQ");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:140:13
        |
    140 |             let _ = write!(stdout, "=VAL");
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:142:17
        |
    142 | /                 let _ = write!(
    143 | |                     stdout,
    144 | |                     " &{}",
    145 | |                     CStr::from_ptr((*event).data.scalar.anchor as *const i8),
    146 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:149:17
        |
    149 | /                 let _ = write!(
    150 | |                     stdout,
    151 | |                     " <{}>",
    152 | |                     CStr::from_ptr((*event).data.scalar.tag as *const i8),
    153 | |                 );
        | |__________________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:155:13
        |
    155 | /             let _ = stdout.write_all(match (*event).data.scalar.style {
    156 | |                 YAML_PLAIN_SCALAR_STYLE => b" :",
    157 | |                 YAML_SINGLE_QUOTED_SCALAR_STYLE => b" '",
    158 | |                 YAML_DOUBLE_QUOTED_SCALAR_STYLE => b" \"",
    ...   |
    161 | |                 _ => process::abort(),
    162 | |             });
        | |_______________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:168:13
        |
    168 |             let _ = writeln!(stdout);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:170:13
        |
    170 | /             let _ = writeln!(
    171 | |                 stdout,
    172 | |                 "=ALI *{}",
    173 | |                 CStr::from_ptr((*event).data.alias.anchor as *const i8),
    174 | |             );
        | |______________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:200:9
        |
    200 |         let _ = stdout.write_all(repr);
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:186:21
        |
    186 | /                     let _ = writeln!(
    187 | |                         io::stderr(),
    188 | |                         "Line too long: '{}'",
    189 | |                         String::from_utf8_lossy(&self.buf),
    190 | |                     );
        | |______________________^
        |
        = 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: the lint level is defined here
       --> src/bin/run-emitter-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::let_underscore_untyped)]` implied by `#[warn(clippy::pedantic)]`

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:208:9
        |
    208 |         let _ = writeln!(io::stderr(), "Usage: run-parser-test-suite <in.yaml>...");
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-parser-test-suite.rs:216:13
        |
    216 |             let _ = writeln!(io::stderr(), "{}", err);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:290:9
        |
    290 | /         let _ = writeln!(
    291 | |             io::stderr(),
    292 | |             "Usage: run-emitter-test-suite <test.event>...",
    293 | |         );
        | |__________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:301:13
        |
    301 |             let _ = writeln!(io::stderr(), "{}", err);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:186:21
        |
    186 | /                     let _ = writeln!(
    187 | |                         io::stderr(),
    188 | |                         "Line too long: '{}'",
    189 | |                         String::from_utf8_lossy(&self.buf),
    190 | |                     );
        | |______________________^
        |
        = 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: the lint level is defined here
       --> src/bin/run-emitter-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::let_underscore_untyped)]` implied by `#[warn(clippy::pedantic)]`

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:290:9
        |
    290 | /         let _ = writeln!(
    291 | |             io::stderr(),
    292 | |             "Usage: run-emitter-test-suite <test.event>...",
    293 | |         );
        | |__________^
        |
        = 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

    warning: non-binding `let` without a type annotation
       --> src/bin/run-emitter-test-suite.rs:301:13
        |
    301 |             let _ = writeln!(io::stderr(), "{}", err);
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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
2023-02-26 22:38:32 -07:00
David Tolnay
742e404404
Enable type layout randomization in CI on nightly 2023-02-19 09:22:00 -08:00
David Tolnay
d4065a3937
Support a manual trigger on CI workflow 2023-02-18 17:23:57 -08:00
David Tolnay
6f0e194e2f
Prevent actions duplication on noop merge commits 2023-02-01 17:55:25 -08:00
David Tolnay
45cedc45ed
Speed up cargo fuzz CI job
https://github.com/rust-fuzz/cargo-fuzz/pull/317
2023-01-19 17:28:31 -08:00
David Tolnay
9bcfdc7997
Opt out -Zrustdoc-scrape-examples on docs.rs
I'd like a chance to audit all the code that rustdoc is inserting into
the docs. Currently I am skeptical that showing unsafe-libyaml's
internal usages of APIs is a net benefit to the public documentation. I
am also skeptical that quite so many examples are needed, and that they
should be featured so prominently in comparison to handwritten docs.
Lastly I wish there were a way to turn this behavior off on a more
granular basis.
2023-01-02 21:45:58 -08:00
David Tolnay
b47a144ecd
Release 0.2.5 2022-12-17 12:01:16 -08:00
David Tolnay
c12a87da1a
Update build status badge 2022-12-15 17:52:43 -08:00
David Tolnay
7b324012c6
Time out workflows after 45 minutes
GitHub's default timeout is 6 hours. Recently some of my GitHub Actions
jobs have started randomly stalling for that long, which is inconvenient
because it ties up a chunk of my runner quota. It apepars to be very
rare for a job to recover after stalling. It's better to time out
quicker and retry on a different runner.
2022-11-25 18:56:19 -08:00
David Tolnay
05927a935d
Fix renamed let_underscore_drop lint
warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
      --> src/lib.rs:23:5
       |
    23 |     clippy::let_underscore_drop,
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
       |
       = note: `#[warn(renamed_and_removed_lints)]` on by default

    warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
     --> src/bin/run-emitter-test-suite.rs:8:5
      |
    8 |     clippy::let_underscore_drop,
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
      |
      = note: `#[warn(renamed_and_removed_lints)]` on by default

    warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
     --> src/bin/run-parser-test-suite.rs:8:5
      |
    8 |     clippy::let_underscore_drop,
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
      |
      = note: `#[warn(renamed_and_removed_lints)]` on by default
2022-11-22 19:18:21 -08:00
David Tolnay
09ae09301c
Resolve needless_borrow pedantic clippy lint in test
error: the borrowed expression implements the required traits
      --> tests/data/lib.rs:36:31
       |
    36 |     for entry in fs::read_dir(&yaml_test_suite).unwrap() {
       |                               ^^^^^^^^^^^^^^^^ help: change this to: `yaml_test_suite`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
       = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
2022-10-24 21:42:13 -07:00
David Tolnay
447a4caa09
Resolve needless_borrow pedantic clippy lint in test
error: the borrowed expression implements the required traits
      --> tests/data/build.rs:23:43
       |
    23 |     let response = reqwest::blocking::get(&url)?.error_for_status()?;
       |                                           ^^^^ help: change this to: `url`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
       = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
2022-10-24 21:33:15 -07:00
David Tolnay
6a235b324e
Ignore uninlined_format_args pedantic clippy lint
error: variables can be used directly in the `format!` string
      --> tests/data/build.rs:24:18
       |
    24 |     let prefix = format!("yaml-test-suite-{}", TAG);
       |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       = note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
    help: change this to
       |
    24 -     let prefix = format!("yaml-test-suite-{}", TAG);
    24 +     let prefix = format!("yaml-test-suite-{TAG}");
       |
2022-10-07 22:25:36 -07:00
David Tolnay
37ccd89b21
Ignore unnecessary_cast clippy lint
error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/api.rs:377:17
        |
    377 |     *fresh153 = (*fresh153 as libc::c_ulong).wrapping_add(size) as size_t as size_t;
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh153 as libc::c_ulong).wrapping_add(size) as size_t`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
        = note: `-D clippy::unnecessary-cast` implied by `-D clippy::all`

    error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/api.rs:377:17
        |
    377 |     *fresh153 = (*fresh153 as libc::c_ulong).wrapping_add(size) as size_t as size_t;
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh153 as libc::c_ulong).wrapping_add(size)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/api.rs:377:17
        |
    377 |     *fresh153 = (*fresh153 as libc::c_ulong).wrapping_add(size) as size_t as size_t;
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*fresh153`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1062:22
         |
    1062 |               length = (length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length)
         |  ______________________^
    1063 | |                 as size_t as size_t;
         | |___________________________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1062 ~             length = (length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length)
    1063 ~                 as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1062:22
         |
    1062 |               length = (length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length)
         |  ______________________^
    1063 | |                 as size_t as size_t;
         | |_________________________^ help: try: `(length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length)`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1062:22
         |
    1062 |             length = (length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length)
         |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `length`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1069:22
         |
    1069 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1070 | |                 (*emitter)
    1071 | |                     .anchor_data
    1072 | |                     .anchor_length
    ...    |
    1075 | |                     .wrapping_add((*emitter).scalar_data.length),
    1076 | |             ) as size_t as size_t;
         | |_________________________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1069 ~             length = (length as libc::c_ulong).wrapping_add(
    1070 +                 (*emitter)
    1071 +                     .anchor_data
    1072 +                     .anchor_length
    1073 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1074 +                     .wrapping_add((*emitter).tag_data.suffix_length)
    1075 +                     .wrapping_add((*emitter).scalar_data.length),
    1076 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1069:22
         |
    1069 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1070 | |                 (*emitter)
    1071 | |                     .anchor_data
    1072 | |                     .anchor_length
    ...    |
    1075 | |                     .wrapping_add((*emitter).scalar_data.length),
    1076 | |             ) as size_t as size_t;
         | |_______________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1069 ~             length = (length as libc::c_ulong).wrapping_add(
    1070 +                 (*emitter)
    1071 +                     .anchor_data
    1072 +                     .anchor_length
    1073 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1074 +                     .wrapping_add((*emitter).tag_data.suffix_length)
    1075 +                     .wrapping_add((*emitter).scalar_data.length),
    1076 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1069:22
         |
    1069 |             length = (length as libc::c_ulong).wrapping_add(
         |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `length`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1082:22
         |
    1082 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1083 | |                 (*emitter)
    1084 | |                     .anchor_data
    1085 | |                     .anchor_length
    1086 | |                     .wrapping_add((*emitter).tag_data.handle_length)
    1087 | |                     .wrapping_add((*emitter).tag_data.suffix_length),
    1088 | |             ) as size_t as size_t;
         | |_________________________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1082 ~             length = (length as libc::c_ulong).wrapping_add(
    1083 +                 (*emitter)
    1084 +                     .anchor_data
    1085 +                     .anchor_length
    1086 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1087 +                     .wrapping_add((*emitter).tag_data.suffix_length),
    1088 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1082:22
         |
    1082 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1083 | |                 (*emitter)
    1084 | |                     .anchor_data
    1085 | |                     .anchor_length
    1086 | |                     .wrapping_add((*emitter).tag_data.handle_length)
    1087 | |                     .wrapping_add((*emitter).tag_data.suffix_length),
    1088 | |             ) as size_t as size_t;
         | |_______________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1082 ~             length = (length as libc::c_ulong).wrapping_add(
    1083 +                 (*emitter)
    1084 +                     .anchor_data
    1085 +                     .anchor_length
    1086 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1087 +                     .wrapping_add((*emitter).tag_data.suffix_length),
    1088 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1082:22
         |
    1082 |             length = (length as libc::c_ulong).wrapping_add(
         |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `length`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1094:22
         |
    1094 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1095 | |                 (*emitter)
    1096 | |                     .anchor_data
    1097 | |                     .anchor_length
    1098 | |                     .wrapping_add((*emitter).tag_data.handle_length)
    1099 | |                     .wrapping_add((*emitter).tag_data.suffix_length),
    1100 | |             ) as size_t as size_t;
         | |_________________________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1094 ~             length = (length as libc::c_ulong).wrapping_add(
    1095 +                 (*emitter)
    1096 +                     .anchor_data
    1097 +                     .anchor_length
    1098 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1099 +                     .wrapping_add((*emitter).tag_data.suffix_length),
    1100 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1094:22
         |
    1094 |               length = (length as libc::c_ulong).wrapping_add(
         |  ______________________^
    1095 | |                 (*emitter)
    1096 | |                     .anchor_data
    1097 | |                     .anchor_length
    1098 | |                     .wrapping_add((*emitter).tag_data.handle_length)
    1099 | |                     .wrapping_add((*emitter).tag_data.suffix_length),
    1100 | |             ) as size_t as size_t;
         | |_______________________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    help: try
         |
    1094 ~             length = (length as libc::c_ulong).wrapping_add(
    1095 +                 (*emitter)
    1096 +                     .anchor_data
    1097 +                     .anchor_length
    1098 +                     .wrapping_add((*emitter).tag_data.handle_length)
    1099 +                     .wrapping_add((*emitter).tag_data.suffix_length),
    1100 ~             ) as size_t;
         |

    error: casting to the same type is unnecessary (`u64` -> `u64`)
        --> src/emitter.rs:1094:22
         |
    1094 |             length = (length as libc::c_ulong).wrapping_add(
         |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `length`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:55:19
       |
    55 |         *fresh2 = (*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:55:19
       |
    55 |         *fresh2 = (*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh2 as libc::c_ulong).wrapping_add(2_u64)`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:55:19
       |
    55 |         *fresh2 = (*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*fresh2`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:71:19
       |
    71 |         *fresh4 = (*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:71:19
       |
    71 |         *fresh4 = (*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh4 as libc::c_ulong).wrapping_add(2_u64)`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:71:19
       |
    71 |         *fresh4 = (*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*fresh4`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:87:19
       |
    87 |         *fresh6 = (*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:87:19
       |
    87 |         *fresh6 = (*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh6 as libc::c_ulong).wrapping_add(3_u64)`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
      --> src/reader.rs:87:19
       |
    87 |         *fresh6 = (*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t as size_t;
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*fresh6`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/reader.rs:400:24
        |
    400 |               *fresh15 = (*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t
        |  ________________________^
    401 | |                 as size_t;
        | |_________________________^ help: try: `(*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/reader.rs:400:24
        |
    400 |             *fresh15 = (*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t
        |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting to the same type is unnecessary (`u64` -> `u64`)
       --> src/reader.rs:400:24
        |
    400 |             *fresh15 = (*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t
        |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*fresh15`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
2022-10-07 22:24:41 -07:00
David Tolnay
e41536d8bd
Release 0.2.4 2022-09-14 21:51:53 -07:00
David Tolnay
e9acfac109
Merge pull request #18 from dtolnay/allocerror
Check allocations for OOM
2022-09-14 21:48:51 -07:00
David Tolnay
7b4443449a
Check allocations for OOM 2022-09-14 21:41:01 -07:00
David Tolnay
435406fd7f
Release 0.2.3 2022-09-14 12:38:25 -07:00
David Tolnay
67d67319d9
Add a sponsors link 2022-09-14 12:37:15 -07:00
David Tolnay
ad5874f594
Remove default package.readme metadata from Cargo.toml
Since cargo 1.46.0, README.md is recognized by default.
2022-09-14 09:16:02 -07:00
David Tolnay
f8756063ff
Ignore bool_to_int_with_if clippy lint
error: boolean to int conversion using if
       --> src/reader.rs:301:28
        |
    301 |                       high = if (*parser).encoding == YAML_UTF16LE_ENCODING {
        |  ____________________________^
    302 | |                         1
    303 | |                     } else {
    304 | |                         0
    305 | |                     };
        | |_____________________^ help: replace with from: `i32::from((*parser).encoding == YAML_UTF16LE_ENCODING)`
        |
        = note: `-D clippy::bool-to-int-with-if` implied by `-D clippy::all`
        = note: `((*parser).encoding == YAML_UTF16LE_ENCODING) as i32` or `((*parser).encoding == YAML_UTF16LE_ENCODING).into()` can also be valid options
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if

    error: boolean to int conversion using if
      --> src/writer.rs:58:29
       |
    58 |       let high: libc::c_int = if (*emitter).encoding == YAML_UTF16LE_ENCODING {
       |  _____________________________^
    59 | |         1
    60 | |     } else {
    61 | |         0
    62 | |     };
       | |_____^ help: replace with from: `i32::from((*emitter).encoding == YAML_UTF16LE_ENCODING)`
       |
       = note: `((*emitter).encoding == YAML_UTF16LE_ENCODING) as i32` or `((*emitter).encoding == YAML_UTF16LE_ENCODING).into()` can also be valid options
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if
2022-09-10 20:16:54 -07:00
David Tolnay
97bc12eaa1
GitHub Workflows security hardening 2022-09-02 15:09:32 -07:00
David Tolnay
fcf3f66309
Release 0.2.2 2022-08-02 16:00:51 -07:00
David Tolnay
ab4842d481
Merge pull request #17 from dtolnay/debug
Derive Debug for all enums
2022-08-02 15:59:46 -07:00
David Tolnay
70f67044e4
Derive Debug for all enums 2022-08-02 15:53:32 -07:00