Commit graph

301 commits

Author SHA1 Message Date
David Tolnay
bf012f373c
Sort package entries in Cargo.toml 2022-07-31 19:19:06 -07:00
David Tolnay
5548f3544e
Simplify some current_block matches 2022-07-30 02:49:26 -07:00
David Tolnay
91400c631f
Simplify cases with same current_block on both branches 2022-07-30 02:38:47 -07:00
David Tolnay
9286fad451
Eliminate return value of some scanner functions 2022-07-30 02:29:21 -07:00
David Tolnay
c88e4039e1
Eliminate return value of emitter increase indent 2022-07-30 02:24:38 -07:00
David Tolnay
cc34693df5
Control flow cleanup 2022-07-30 02:23:08 -07:00
David Tolnay
c5981734ce
Remove $context arg from macros where unused 2022-07-30 02:13:03 -07:00
David Tolnay
44b9e9795a
Eliminate return value of stack push 2022-07-30 02:06:23 -07:00
David Tolnay
560f7b2032
Eliminate return value of queue extend 2022-07-30 01:50:39 -07:00
David Tolnay
5cc0719831
Eliminate return value of string join 2022-07-30 01:41:45 -07:00
David Tolnay
83c0c40ea6
Eliminate return value of scanner read helpers 2022-07-30 01:36:29 -07:00
David Tolnay
4ae8d3df25
Eliminate return value of string extend 2022-07-30 01:33:15 -07:00
David Tolnay
f88b6641c2
Merge pull request #15 from dtolnay/oom
More malloc cleanup
2022-07-30 01:33:06 -07:00
David Tolnay
71d266d6de
Resolve needless_late_init clippy lints 2022-07-30 01:25:44 -07:00
David Tolnay
a06fe68a3e
Clean up dead code in parser init and emitter init 2022-07-30 01:21:18 -07:00
David Tolnay
da96d42456
Eliminate return value of queue init 2022-07-30 01:20:14 -07:00
David Tolnay
5c028a3ded
Eliminate return value of string init 2022-07-30 01:20:03 -07:00
David Tolnay
e0a86e6089
Eliminate return value of stack init 2022-07-30 01:16:44 -07:00
David Tolnay
ed7d2e6037
Remove unused parser arg of process_empty_scalar 2022-07-30 01:13:21 -07:00
David Tolnay
82fd332271
Eliminate return value of buffer init 2022-07-30 01:13:21 -07:00
David Tolnay
76ea0104e0
Merge pull request #14 from dtolnay/oom
Remove malloc null checks
2022-07-30 01:13:14 -07:00
David Tolnay
85bc4324fc
Remove malloc null checks 2022-07-30 01:06:08 -07:00
David Tolnay
5d421b89e9
Release 0.2.1 2022-07-27 18:33:49 -07:00
David Tolnay
43ecb070ec
Merge pull request #13 from dtolnay/stackoverflow
Fix stack overflow in yaml_emitter_anchor_node
2022-07-27 18:25:41 -07:00
David Tolnay
d18c7dc407
Fix stack overflow in yaml_emitter_anchor_node 2022-07-27 18:18:47 -07:00
David Tolnay
1884364957
Merge pull request #12 from dtolnay/bufferoverflow
Fix heap buffer overflow in yaml_emitter_emit_flow_mapping_key
2022-07-27 18:18:41 -07:00
David Tolnay
90b50bb321
Remove unneeded _usize integer suffix 2022-07-27 18:10:48 -07:00
David Tolnay
b1cc5567b2
Fix heap buffer overflow in yaml_emitter_emit_flow_mapping_key 2022-07-27 18:10:48 -07:00
David Tolnay
5132ad2a57
Merge pull request #11 from dtolnay/cintcast
Remove some needless libc::c_int casts
2022-07-27 18:10:42 -07:00
David Tolnay
8f5738e829
Remove some needless libc::c_int casts 2022-07-27 18:04:55 -07:00
David Tolnay
085e3af17f
Merge pull request #10 from dtolnay/enums
Remove integer casts from enum comparisons
2022-07-27 18:04:46 -07:00
David Tolnay
326db391d8
Resolve needless_return clippy lints
error: unneeded `return` statement
       --> src/emitter.rs:253:41
        |
    253 |         YAML_EMIT_STREAM_START_STATE => return yaml_emitter_emit_stream_start(emitter, event),
        |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_stream_start(emitter, event)`
        |
        = note: `-D clippy::needless-return` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:255:13
        |
    255 |             return yaml_emitter_emit_document_start(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_document_start(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:258:13
        |
    258 |             return yaml_emitter_emit_document_start(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_document_start(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:261:13
        |
    261 |             return yaml_emitter_emit_document_content(emitter, event)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_document_content(emitter, event)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:263:41
        |
    263 |         YAML_EMIT_DOCUMENT_END_STATE => return yaml_emitter_emit_document_end(emitter, event),
        |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_document_end(emitter, event)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:265:13
        |
    265 |             return yaml_emitter_emit_flow_sequence_item(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_sequence_item(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:268:13
        |
    268 |             return yaml_emitter_emit_flow_sequence_item(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_sequence_item(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:271:13
        |
    271 |             return yaml_emitter_emit_flow_mapping_key(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_mapping_key(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:274:13
        |
    274 |             return yaml_emitter_emit_flow_mapping_key(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_mapping_key(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:277:13
        |
    277 |             return yaml_emitter_emit_flow_mapping_value(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_mapping_value(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:280:13
        |
    280 |             return yaml_emitter_emit_flow_mapping_value(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_flow_mapping_value(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:283:13
        |
    283 |             return yaml_emitter_emit_block_sequence_item(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_sequence_item(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:286:13
        |
    286 |             return yaml_emitter_emit_block_sequence_item(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_sequence_item(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:289:13
        |
    289 |             return yaml_emitter_emit_block_mapping_key(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_mapping_key(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:292:13
        |
    292 |             return yaml_emitter_emit_block_mapping_key(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_mapping_key(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:295:13
        |
    295 |             return yaml_emitter_emit_block_mapping_value(emitter, event, true)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_mapping_value(emitter, event, true)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:298:13
        |
    298 |             return yaml_emitter_emit_block_mapping_value(emitter, event, false)
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `yaml_emitter_emit_block_mapping_value(emitter, event, false)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/emitter.rs:301:13
        |
    301 | /             return yaml_emitter_set_emitter_error(
    302 | |                 emitter,
    303 | |                 b"expected nothing after STREAM-END\0" as *const u8 as *const libc::c_char,
    304 | |             )
        | |_____________^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    help: remove `return`
        |
    301 ~             yaml_emitter_set_emitter_error(
    302 +                 emitter,
    303 +                 b"expected nothing after STREAM-END\0" as *const u8 as *const libc::c_char,
    304 +             )
        |
2022-07-27 17:55:37 -07:00
David Tolnay
aada00c078
Remove integer casts from enum comparisons 2022-07-27 17:53:11 -07:00
David Tolnay
ae6115c02c
Release 0.2.0 2022-07-23 15:19:51 -07:00
David Tolnay
f77851265b
Merge pull request #8 from dtolnay/handler
Disallow None handler function argument
2022-07-23 15:19:00 -07:00
David Tolnay
6d45d7c9a5
Disallow None handler function argument 2022-07-23 15:12:41 -07:00
David Tolnay
cf82ce23b9
Merge pull request #7 from dtolnay/getversion
Delete get_version APIs
2022-07-23 15:12:34 -07:00
David Tolnay
4fa84c1ef9
Delete get_version APIs 2022-07-23 15:05:07 -07:00
David Tolnay
8a8ec2ffa3
Merge pull request #6 from dtolnay/bool
Replace c_int -> bool for 0/1 valued booleans
2022-07-23 14:58:00 -07:00
David Tolnay
692ad8bc18
Ignore fn_params_excessive_bools pedantic clippy lint
warning: more than 3 bools in function parameters
       --> src/emitter.rs:975:1
        |
    975 | / unsafe fn yaml_emitter_emit_node(
    976 | |     mut emitter: *mut yaml_emitter_t,
    977 | |     event: *mut yaml_event_t,
    978 | |     root: bool,
    ...   |
    997 | |     }
    998 | | }
        | |_^
        |
    note: the lint level is defined here
       --> src/lib.rs:10:9
        |
    10  | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::fn_params_excessive_bools)]` implied by `#[warn(clippy::pedantic)]`
        = help: consider refactoring bools into two-variant enums
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#fn_params_excessive_bools
2022-07-23 14:51:55 -07:00
David Tolnay
2c89cfb523
Replace c_int -> bool for 0/1 valued booleans 2022-07-23 14:50:57 -07:00
David Tolnay
3bbac47098
Remove unneeded integer suffixes 2022-07-23 14:02:15 -07:00
David Tolnay
62849551dd
Change all hex number literals to uppercase 2022-07-23 13:58:48 -07:00
David Tolnay
668328a578
Ignore manual_range_contains clippy lint
error: manual `RangeInclusive::contains` implementation
       --> src/reader.rs:286:28
        |
    286 |                         if value >= 0xd800_u32 && value <= 0xdfff_u32
        |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xd800_u32..=0xdfff_u32).contains(&value)`
        |
        = note: `-D clippy::manual-range-contains` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains

    error: manual `RangeInclusive::contains` implementation
       --> src/reader.rs:391:20
        |
    391 |                 || value >= 0x20_u32 && value <= 0x7e_u32
        |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x20_u32..=0x7e_u32).contains(&value)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains

    error: manual `RangeInclusive::contains` implementation
       --> src/reader.rs:393:20
        |
    393 |                 || value >= 0xa0_u32 && value <= 0xd7ff_u32
        |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xa0_u32..=0xd7ff_u32).contains(&value)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains

    error: manual `RangeInclusive::contains` implementation
       --> src/reader.rs:394:20
        |
    394 |                 || value >= 0xe000_u32 && value <= 0xfffd_u32
        |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xe000_u32..=0xfffd_u32).contains(&value)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains

    error: manual `RangeInclusive::contains` implementation
       --> src/reader.rs:395:20
        |
    395 |                 || value >= 0x10000_u32 && value <= 0x10ffff_u32)
        |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x10000_u32..=0x10ffff_u32).contains(&value)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains

    error: manual `RangeInclusive::contains` implementation
        --> src/scanner.rs:2611:48
         |
    2611 |   ...                   if value >= 0xd800_u32
         |  __________________________^
    2612 | | ...                       && value <= 0xdfff_u32
         | |________________________________________________^ help: use: `(0xd800_u32..=0xdfff_u32).contains(&value)`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
2022-07-23 13:50:33 -07:00
David Tolnay
c7128fbccf
Resolve unnecessary_cast clippy lints
error: casting integer literal to `u32` is unnecessary
       --> src/api.rs:624:43
        |
    624 |             || width == 2_u32 && value >= 0x80 as libc::c_uint
        |                                           ^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = note: `-D clippy::unnecessary-cast` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/api.rs:625:43
        |
    625 |             || width == 3_u32 && value >= 0x800 as libc::c_uint
        |                                           ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x800_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/api.rs:626:43
        |
    626 |             || width == 4_u32 && value >= 0x10000 as libc::c_uint)
        |                                           ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/emitter.rs:2209:35
         |
    2209 |                     if value_0 <= 0xff as libc::c_uint {
         |                                   ^^^^^^^^^^^^^^^^^^^^ help: try: `0xff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/emitter.rs:2214:42
         |
    2214 |                     } else if value_0 <= 0xffff as libc::c_uint {
         |                                          ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xffff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:274:59
        |
    274 | ...                   || width == 2_u32 && value >= 0x80 as libc::c_uint
        |                                                     ^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:275:59
        |
    275 | ...                   || width == 3_u32 && value >= 0x800 as libc::c_uint
        |                                                     ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x800_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:276:59
        |
    276 | ...                   || width == 4_u32 && value >= 0x10000 as libc::c_uint)
        |                                                     ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:286:37
        |
    286 |                         if value >= 0xd800 as libc::c_uint && value <= 0xdfff as libc::c_uint
        |                                     ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xd800_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:286:72
        |
    286 |                         if value >= 0xd800 as libc::c_uint && value <= 0xdfff as libc::c_uint
        |                                                                        ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xdfff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:287:40
        |
    287 | ...                   || value > 0x10ffff as libc::c_uint
        |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10ffff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:330:36
        |
    330 |                         if value & 0xfc00 as libc::c_uint == 0xdc00 as libc::c_uint {
        |                                    ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xfc00_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:330:62
        |
    330 |                         if value & 0xfc00 as libc::c_uint == 0xdc00 as libc::c_uint {
        |                                                              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xdc00_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:339:36
        |
    339 |                         if value & 0xfc00 as libc::c_uint == 0xd800 as libc::c_uint {
        |                                    ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xfc00_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:339:62
        |
    339 |                         if value & 0xfc00 as libc::c_uint == 0xd800 as libc::c_uint {
        |                                                              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xd800_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:365:45
        |
    365 | ...                   if value2 & 0xfc00 as libc::c_uint != 0xdc00 as libc::c_uint {
        |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xfc00_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:365:71
        |
    365 | ...                   if value2 & 0xfc00 as libc::c_uint != 0xdc00 as libc::c_uint {
        |                                                             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xdc00_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:374:41
        |
    374 | ...                   value = (0x10000 as libc::c_uint)
        |                               ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:375:60
        |
    375 | ...                   .wrapping_add((value & 0x3ff as libc::c_uint) << 10)
        |                                              ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x3ff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:376:60
        |
    376 | ...                   .wrapping_add(value2 & 0x3ff as libc::c_uint);
        |                                              ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x3ff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:388:27
        |
    388 |             if !(value == 0x9 as libc::c_uint
        |                           ^^^^^^^^^^^^^^^^^^^ help: try: `0x9_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:389:29
        |
    389 |                 || value == 0xa as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^ help: try: `0xa_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:390:29
        |
    390 |                 || value == 0xd as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^ help: try: `0xd_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:391:29
        |
    391 |                 || value >= 0x20 as libc::c_uint && value <= 0x7e as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x20_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:391:62
        |
    391 |                 || value >= 0x20 as libc::c_uint && value <= 0x7e as libc::c_uint
        |                                                              ^^^^^^^^^^^^^^^^^^^^ help: try: `0x7e_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:392:29
        |
    392 |                 || value == 0x85 as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x85_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:393:29
        |
    393 |                 || value >= 0xa0 as libc::c_uint && value <= 0xd7ff as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0xa0_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:393:62
        |
    393 |                 || value >= 0xa0 as libc::c_uint && value <= 0xd7ff as libc::c_uint
        |                                                              ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xd7ff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:394:29
        |
    394 |                 || value >= 0xe000 as libc::c_uint && value <= 0xfffd as libc::c_uint
        |                             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xe000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:394:64
        |
    394 |                 || value >= 0xe000 as libc::c_uint && value <= 0xfffd as libc::c_uint
        |                                                                ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xfffd_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:395:29
        |
    395 |                 || value >= 0x10000 as libc::c_uint && value <= 0x10ffff as libc::c_uint)
        |                             ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:395:65
        |
    395 |                 || value >= 0x10000 as libc::c_uint && value <= 0x10ffff as libc::c_uint)
        |                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10ffff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:409:25
        |
    409 |             if value <= 0x7f as libc::c_uint {
        |                         ^^^^^^^^^^^^^^^^^^^^ help: try: `0x7f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:414:32
        |
    414 |             } else if value <= 0x7ff as libc::c_uint {
        |                                ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x7ff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:418:28
        |
    418 |                 *fresh19 = (0xc0 as libc::c_uint).wrapping_add(value >> 6) as yaml_char_t;
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xc0_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:422:28
        |
    422 |                 *fresh21 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:422:72
        |
    422 |                 *fresh21 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                                                                        ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:424:32
        |
    424 |             } else if value <= 0xffff as libc::c_uint {
        |                                ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xffff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:428:28
        |
    428 |                 *fresh23 = (0xe0 as libc::c_uint).wrapping_add(value >> 12) as yaml_char_t;
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xe0_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:432:28
        |
    432 |                 *fresh25 = (0x80 as libc::c_uint).wrapping_add(value >> 6 & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:432:77
        |
    432 |                 *fresh25 = (0x80 as libc::c_uint).wrapping_add(value >> 6 & 0x3f as libc::c_uint)
        |                                                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:437:28
        |
    437 |                 *fresh27 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:437:72
        |
    437 |                 *fresh27 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                                                                        ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:443:28
        |
    443 |                 *fresh29 = (0xf0 as libc::c_uint).wrapping_add(value >> 18) as yaml_char_t;
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xf0_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:447:28
        |
    447 |                 *fresh31 = (0x80 as libc::c_uint).wrapping_add(value >> 12 & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:447:78
        |
    447 |                 *fresh31 = (0x80 as libc::c_uint).wrapping_add(value >> 12 & 0x3f as libc::c_uint)
        |                                                                              ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:452:28
        |
    452 |                 *fresh33 = (0x80 as libc::c_uint).wrapping_add(value >> 6 & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:452:77
        |
    452 |                 *fresh33 = (0x80 as libc::c_uint).wrapping_add(value >> 6 & 0x3f as libc::c_uint)
        |                                                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:457:28
        |
    457 |                 *fresh35 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/reader.rs:457:72
        |
    457 |                 *fresh35 = (0x80 as libc::c_uint).wrapping_add(value & 0x3f as libc::c_uint)
        |                                                                        ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2611:57
         |
    2611 | ...                   if value >= 0xd800 as libc::c_uint
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xd800_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2612:61
         |
    2612 | ...                   && value <= 0xdfff as libc::c_uint
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xdfff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2613:60
         |
    2613 | ...                   || value > 0x10ffff as libc::c_uint
         |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10ffff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2627:61
         |
    2627 | ...                   if value <= 0x7f as libc::c_uint {
         |                                   ^^^^^^^^^^^^^^^^^^^^ help: try: `0x7f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2632:68
         |
    2632 | ...                   } else if value <= 0x7ff as libc::c_uint {
         |                                          ^^^^^^^^^^^^^^^^^^^^^ help: try: `0x7ff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2636:65
         |
    2636 | ...                   *fresh574 = (0xc0 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xc0_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2642:65
         |
    2642 | ...                   *fresh575 = (0x80 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2643:79
         |
    2643 | ...                   .wrapping_add(value & 0x3f as libc::c_uint)
         |                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2645:68
         |
    2645 | ...                   } else if value <= 0xffff as libc::c_uint {
         |                                          ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xffff_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2649:65
         |
    2649 | ...                   *fresh576 = (0xe0 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xe0_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2655:65
         |
    2655 | ...                   *fresh577 = (0x80 as libc::c_uint).wrapping_add(
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2656:70
         |
    2656 | ...                   value >> 6 & 0x3f as libc::c_uint,
         |                                    ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2662:65
         |
    2662 | ...                   *fresh578 = (0x80 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2663:79
         |
    2663 | ...                   .wrapping_add(value & 0x3f as libc::c_uint)
         |                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2669:65
         |
    2669 | ...                   *fresh579 = (0xf0 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xf0_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2675:65
         |
    2675 | ...                   *fresh580 = (0x80 as libc::c_uint).wrapping_add(
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2676:71
         |
    2676 | ...                   value >> 12 & 0x3f as libc::c_uint,
         |                                     ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2682:65
         |
    2682 | ...                   *fresh581 = (0x80 as libc::c_uint).wrapping_add(
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2683:70
         |
    2683 | ...                   value >> 6 & 0x3f as libc::c_uint,
         |                                    ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2689:65
         |
    2689 | ...                   *fresh582 = (0x80 as libc::c_uint)
         |                                   ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x80_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
        --> src/scanner.rs:2690:79
         |
    2690 | ...                   .wrapping_add(value & 0x3f as libc::c_uint)
         |                                             ^^^^^^^^^^^^^^^^^^^^ help: try: `0x3f_u32`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:101:20
        |
    101 |         if value < 0x10000 as libc::c_uint {
        |                    ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:105:26
        |
    105 |                 (value & 0xff as libc::c_uint) as libc::c_uchar;
        |                          ^^^^^^^^^^^^^^^^^^^^ help: try: `0xff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:109:40
        |
    109 |             value = value.wrapping_sub(0x10000 as libc::c_uint);
        |                                        ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x10000_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:111:17
        |
    111 |                 (0xd8 as libc::c_uint).wrapping_add(value >> 18) as libc::c_uchar;
        |                 ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xd8_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:113:32
        |
    113 |                 (value >> 10 & 0xff as libc::c_uint) as libc::c_uchar;
        |                                ^^^^^^^^^^^^^^^^^^^^ help: try: `0xff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:117:57
        |
    117 |                 .wrapping_offset((high + 2) as isize) = (0xdc as libc::c_uint)
        |                                                         ^^^^^^^^^^^^^^^^^^^^^^ help: try: `0xdc_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:118:44
        |
    118 |                 .wrapping_add(value >> 8 & 0xff as libc::c_uint)
        |                                            ^^^^^^^^^^^^^^^^^^^^ help: try: `0xff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

    error: casting integer literal to `u32` is unnecessary
       --> src/writer.rs:124:26
        |
    124 |                 (value & 0xff as libc::c_uint) as libc::c_uchar;
        |                          ^^^^^^^^^^^^^^^^^^^^ help: try: `0xff_u32`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
2022-07-23 13:50:33 -07:00
David Tolnay
39bf233ca6
Remove unneeded integer suffixes
sed -i 's/_i32//' src/*.rs
2022-07-23 13:47:25 -07:00
David Tolnay
08913865a8
Move .ok out of WRITE macros 2022-07-23 13:35:41 -07:00
David Tolnay
807f8e23ca
Clean up control flow in emitter helpers 2022-07-23 13:34:06 -07:00
David Tolnay
99363eb8b7
Replace !result.ok with result.fail and vice versa 2022-07-23 13:27:45 -07:00
David Tolnay
d28f0332aa
Delete unneeded parens 2022-07-23 13:20:43 -07:00