mirror of
https://github.com/simonask/libyaml-safer
synced 2024-11-10 13:54:17 +00:00
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
This commit is contained in:
parent
97bc12eaa1
commit
f8756063ff
1 changed files with 1 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
#![allow(non_camel_case_types, non_snake_case)]
|
||||
#![warn(clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::bool_to_int_with_if,
|
||||
clippy::cast_lossless,
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_possible_wrap,
|
||||
|
|
Loading…
Reference in a new issue