aboutsummaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/xml/mod.rs2
-rw-r--r--src/xml/parsers_complete.rs7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/xml/mod.rs b/src/xml/mod.rs
index b0d9056..005a122 100644
--- a/src/xml/mod.rs
+++ b/src/xml/mod.rs
@@ -328,7 +328,7 @@ impl<'s> Deref for CharData<'s> {
/// [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
#[derive(Clone, Debug, PartialEq, Eq)]
#[repr(transparent)]
-pub struct Comment<'s>(&'s str);
+pub struct Comment<'s>(pub(crate) &'s str);
impl<'s> Deref for Comment<'s> {
type Target = &'s str;
diff --git a/src/xml/parsers_complete.rs b/src/xml/parsers_complete.rs
index f18d0ff..1e2ac31 100644
--- a/src/xml/parsers_complete.rs
+++ b/src/xml/parsers_complete.rs
@@ -40,7 +40,12 @@ pub trait Parser<'s> {
return Err(crate::error::Error::ExtraData(rest.to_string()));
}
}
- Result::Err(e) => return Err(crate::error::Error::ParseError(e.to_string())),
+ Result::Err(e) => {
+ return Err(crate::error::Error::ParseError(
+ input.to_string(),
+ e.to_string(),
+ ))
+ }
}
}
}