Skip to content

Commit fe9b040

Browse files
committed
Get rid warning when compile without "serialize" feature
Introduced in #571
1 parent 42e2350 commit fe9b040

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/events/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ use crate::errors::{Error, Result};
4949
use crate::escape::{escape, partial_escape, unescape_with};
5050
use crate::name::{LocalName, QName};
5151
use crate::reader::is_whitespace;
52-
use crate::utils::{write_cow_string, CowRef};
52+
use crate::utils::write_cow_string;
53+
#[cfg(feature = "serialize")]
54+
use crate::utils::CowRef;
5355
use attributes::{Attribute, Attributes};
5456
use std::mem::replace;
5557

@@ -198,6 +200,7 @@ impl<'a> BytesStart<'a> {
198200
/// - `'a`: Lifetime of the input data from which this event is borrow
199201
/// - `'e`: Lifetime of the concrete event instance
200202
// TODO: We should made this is a part of public API, but with safe wrapped for a name
203+
#[cfg(feature = "serialize")]
201204
pub(crate) fn raw_name<'e>(&'e self) -> CowRef<'a, 'e, [u8]> {
202205
match self.buf {
203206
Cow::Borrowed(b) => CowRef::Input(&b[..self.name_len]),

0 commit comments

Comments
 (0)