Merge pull request #17 from dtolnay/debug

Derive Debug for all enums
This commit is contained in:
David Tolnay 2022-08-02 15:59:46 -07:00 committed by GitHub
commit ab4842d481
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ pub struct yaml_tag_directive_t {
} }
/// The stream encoding. /// The stream encoding.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_encoding_t { pub enum yaml_encoding_t {
@ -47,7 +47,7 @@ pub enum yaml_encoding_t {
} }
/// Line break type. /// Line break type.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_break_t { pub enum yaml_break_t {
@ -62,7 +62,7 @@ pub enum yaml_break_t {
} }
/// Many bad things could happen with the parser and emitter. /// Many bad things could happen with the parser and emitter.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_error_type_t { pub enum yaml_error_type_t {
@ -98,7 +98,7 @@ pub struct yaml_mark_t {
} }
/// Scalar styles. /// Scalar styles.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_scalar_style_t { pub enum yaml_scalar_style_t {
@ -117,7 +117,7 @@ pub enum yaml_scalar_style_t {
} }
/// Sequence styles. /// Sequence styles.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_sequence_style_t { pub enum yaml_sequence_style_t {
@ -130,7 +130,7 @@ pub enum yaml_sequence_style_t {
} }
/// Mapping styles. /// Mapping styles.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_mapping_style_t { pub enum yaml_mapping_style_t {
@ -143,7 +143,7 @@ pub enum yaml_mapping_style_t {
} }
/// Token types. /// Token types.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_token_type_t { pub enum yaml_token_type_t {
@ -346,7 +346,7 @@ pub struct unnamed_yaml_token_t_data_tag_directive {
} }
/// Event types. /// Event types.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_event_type_t { pub enum yaml_event_type_t {
@ -578,7 +578,7 @@ pub struct unnamed_yaml_event_t_data_mapping_start {
} }
/// Node types. /// Node types.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_node_type_t { pub enum yaml_node_type_t {
@ -770,7 +770,7 @@ pub struct yaml_simple_key_t {
} }
/// The states of the parser. /// The states of the parser.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_parser_state_t { pub enum yaml_parser_state_t {
@ -991,7 +991,7 @@ pub type yaml_write_handler_t =
unsafe fn(data: *mut libc::c_void, buffer: *mut libc::c_uchar, size: size_t) -> libc::c_int; unsafe fn(data: *mut libc::c_void, buffer: *mut libc::c_uchar, size: size_t) -> libc::c_int;
/// The emitter states. /// The emitter states.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)] #[repr(u32)]
#[non_exhaustive] #[non_exhaustive]
pub enum yaml_emitter_state_t { pub enum yaml_emitter_state_t {