Remove yaml_error_type_t

This commit is contained in:
Simon Ask Ulsnes 2024-02-02 09:54:07 +01:00
parent 04168ca612
commit cd9bccecee
2 changed files with 6 additions and 32 deletions

View file

@ -130,17 +130,15 @@ pub use crate::scanner::yaml_parser_scan;
pub use crate::writer::yaml_emitter_flush;
pub use crate::yaml::{
yaml_alias_data_t, yaml_break_t, yaml_document_t, yaml_emitter_state_t, yaml_emitter_t,
yaml_encoding_t, yaml_error_type_t, yaml_event_t, yaml_mapping_style_t, yaml_mark_t,
yaml_node_item_t, yaml_node_pair_t, yaml_node_t, yaml_parser_state_t, yaml_parser_t,
yaml_read_handler_t, yaml_scalar_style_t, yaml_sequence_style_t, yaml_simple_key_t,
yaml_tag_directive_t, yaml_token_t, yaml_token_type_t, yaml_version_directive_t,
yaml_write_handler_t, YamlEventData,
yaml_encoding_t, yaml_event_t, yaml_mapping_style_t, yaml_mark_t, yaml_node_item_t,
yaml_node_pair_t, yaml_node_t, yaml_parser_state_t, yaml_parser_t, yaml_read_handler_t,
yaml_scalar_style_t, yaml_sequence_style_t, yaml_simple_key_t, yaml_tag_directive_t,
yaml_token_t, yaml_token_type_t, yaml_version_directive_t, yaml_write_handler_t, YamlEventData,
};
#[doc(hidden)]
pub use crate::yaml::{
yaml_break_t::*, yaml_emitter_state_t::*, yaml_encoding_t::*, yaml_error_type_t::*,
yaml_mapping_style_t::*, yaml_parser_state_t::*, yaml_scalar_style_t::*,
yaml_sequence_style_t::*, yaml_token_type_t::*,
yaml_break_t::*, yaml_emitter_state_t::*, yaml_encoding_t::*, yaml_mapping_style_t::*,
yaml_parser_state_t::*, yaml_scalar_style_t::*, yaml_sequence_style_t::*, yaml_token_type_t::*,
};
#[cfg(test)]

View file

@ -62,30 +62,6 @@ pub enum yaml_break_t {
YAML_CRLN_BREAK = 3,
}
/// Many bad things could happen with the parser and emitter.
#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_error_type_t {
/// No error is produced.
#[default]
YAML_NO_ERROR = 0,
/// Cannot allocate or reallocate a block of memory.
YAML_MEMORY_ERROR = 1,
/// Cannot read or decode the input stream.
YAML_READER_ERROR = 2,
/// Cannot scan the input stream.
YAML_SCANNER_ERROR = 3,
/// Cannot parse the input stream.
YAML_PARSER_ERROR = 4,
/// Cannot compose a YAML document.
YAML_COMPOSER_ERROR = 5,
/// Cannot write to the output stream.
YAML_WRITER_ERROR = 6,
/// Cannot emit a YAML stream.
YAML_EMITTER_ERROR = 7,
}
/// The pointer position.
#[derive(Copy, Clone, Default, Debug)]
#[repr(C)]