diff --git a/src/api.rs b/src/api.rs index 2e44d66..8231968 100644 --- a/src/api.rs +++ b/src/api.rs @@ -374,7 +374,7 @@ unsafe fn yaml_string_write_handler( size, ); let fresh153 = addr_of_mut!((*(*emitter).output.string.size_written)); - *fresh153 = (*fresh153 as libc::c_ulong).wrapping_add(size) as size_t as size_t; + *fresh153 = (*fresh153 as libc::c_ulong).wrapping_add(size) as size_t; 1 } diff --git a/src/emitter.rs b/src/emitter.rs index 11f5cbd..c749ce9 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -1046,7 +1046,7 @@ unsafe fn yaml_emitter_check_simple_key(emitter: *mut yaml_emitter_t) -> bool { match (*event).type_ { YAML_ALIAS_EVENT => { length = (length as libc::c_ulong).wrapping_add((*emitter).anchor_data.anchor_length) - as size_t as size_t; + as size_t; } YAML_SCALAR_EVENT => { if (*emitter).scalar_data.multiline { @@ -1059,7 +1059,7 @@ unsafe fn yaml_emitter_check_simple_key(emitter: *mut yaml_emitter_t) -> bool { .wrapping_add((*emitter).tag_data.handle_length) .wrapping_add((*emitter).tag_data.suffix_length) .wrapping_add((*emitter).scalar_data.length), - ) as size_t as size_t; + ) as size_t; } YAML_SEQUENCE_START_EVENT => { if !yaml_emitter_check_empty_sequence(emitter) { @@ -1071,7 +1071,7 @@ unsafe fn yaml_emitter_check_simple_key(emitter: *mut yaml_emitter_t) -> bool { .anchor_length .wrapping_add((*emitter).tag_data.handle_length) .wrapping_add((*emitter).tag_data.suffix_length), - ) as size_t as size_t; + ) as size_t; } YAML_MAPPING_START_EVENT => { if !yaml_emitter_check_empty_mapping(emitter) { @@ -1083,7 +1083,7 @@ unsafe fn yaml_emitter_check_simple_key(emitter: *mut yaml_emitter_t) -> bool { .anchor_length .wrapping_add((*emitter).tag_data.handle_length) .wrapping_add((*emitter).tag_data.suffix_length), - ) as size_t as size_t; + ) as size_t; } _ => return false, } diff --git a/src/reader.rs b/src/reader.rs index 264ad92..7348292 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -52,7 +52,7 @@ unsafe fn yaml_parser_determine_encoding(parser: *mut yaml_parser_t) -> Success let fresh1 = addr_of_mut!((*parser).raw_buffer.pointer); *fresh1 = (*fresh1).wrapping_offset(2_isize); let fresh2 = addr_of_mut!((*parser).offset); - *fresh2 = (*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t; + *fresh2 = (*fresh2 as libc::c_ulong).wrapping_add(2_u64) as size_t; } else if (*parser) .raw_buffer .last @@ -68,7 +68,7 @@ unsafe fn yaml_parser_determine_encoding(parser: *mut yaml_parser_t) -> Success let fresh3 = addr_of_mut!((*parser).raw_buffer.pointer); *fresh3 = (*fresh3).wrapping_offset(2_isize); let fresh4 = addr_of_mut!((*parser).offset); - *fresh4 = (*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t as size_t; + *fresh4 = (*fresh4 as libc::c_ulong).wrapping_add(2_u64) as size_t; } else if (*parser) .raw_buffer .last @@ -84,7 +84,7 @@ unsafe fn yaml_parser_determine_encoding(parser: *mut yaml_parser_t) -> Success let fresh5 = addr_of_mut!((*parser).raw_buffer.pointer); *fresh5 = (*fresh5).wrapping_offset(3_isize); let fresh6 = addr_of_mut!((*parser).offset); - *fresh6 = (*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t as size_t; + *fresh6 = (*fresh6 as libc::c_ulong).wrapping_add(3_u64) as size_t; } else { (*parser).encoding = YAML_UTF8_ENCODING; } @@ -397,8 +397,7 @@ pub(crate) unsafe fn yaml_parser_update_buffer( let fresh14 = addr_of_mut!((*parser).raw_buffer.pointer); *fresh14 = (*fresh14).wrapping_offset(width as isize); let fresh15 = addr_of_mut!((*parser).offset); - *fresh15 = (*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t - as size_t; + *fresh15 = (*fresh15 as libc::c_ulong).wrapping_add(width as libc::c_ulong) as size_t; if value <= 0x7F { let fresh16 = addr_of_mut!((*parser).buffer.last); let fresh17 = *fresh16;