Make comments optional.
Add a default "comments" feature to transform comments into errors when unset. This is so that XMPP implementations don’t have to care about comments, as they can’t happen in the stream.
This commit is contained in:
parent
aa8018d999
commit
a91252c861
6 changed files with 32 additions and 1 deletions
|
|
@ -28,6 +28,11 @@ pub enum Error {
|
|||
/// An error which is returned when an elemet's name contains more than one colon
|
||||
#[fail(display = "the XML element is invalid")]
|
||||
InvalidElement,
|
||||
|
||||
/// An error which is returned when a comment is to be parsed by minidom
|
||||
#[cfg(not(comments))]
|
||||
#[fail(display = "a comment has been found even though comments are disabled by feature")]
|
||||
CommentsDisabled,
|
||||
}
|
||||
|
||||
impl From<::quick_xml::Error> for Error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue