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}");
|
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
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