Skip to content

Commit 9ca52b9

Browse files
committed
Redundant error
1 parent 444a7c2 commit 9ca52b9

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/reader/error.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub(crate) enum SyntaxError {
3434
UnexpectedOpeningTag,
3535
/// Missing `]]>`
3636
UnclosedCdata,
37-
UnexpectedCdataEnd,
3837
UnexpectedQualifiedName(Token),
3938
UnexpectedTokenOutsideRoot(Token),
4039
UnexpectedToken(Token),
@@ -87,7 +86,6 @@ impl SyntaxError {
8786
Self::ProcessingInstructionWithoutName => "Encountered processing instruction without a name".into(),
8887
Self::UnbalancedRootElement => "Unexpected end of stream: still inside the root element".into(),
8988
Self::UnclosedCdata => "Unclosed <![CDATA[".into(),
90-
Self::UnexpectedCdataEnd => "]]> is not allowed in text".into(),
9189
Self::UnexpectedEof => "Unexpected end of stream".into(),
9290
Self::UnexpectedOpeningTag => "'<' is not allowed in attributes".into(),
9391
Self::CannotUndefinePrefix(ref ln) => format!("Cannot undefine prefix '{ln}'").into(),

src/reader/parser/outside_tag.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ impl PullParser {
133133
self.into_state(State::InsideCData, next_event)
134134
},
135135

136-
Token::CDataEnd => Some(self.error(SyntaxError::UnexpectedCdataEnd)),
137-
138136
_ => Some(self.error(SyntaxError::UnexpectedToken(t)))
139137
}
140138
}

tests/event_reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fn issue_32_unescaped_cdata_end() {
304304
br#"
305305
|StartDocument(1.0, UTF-8)
306306
|StartElement(hello)
307-
|1:8 ]]> is not allowed in text
307+
|1:8 Unexpected token: ]]>
308308
"#,
309309
ParserConfig::new(),
310310
false,

0 commit comments

Comments
 (0)