fix: Fix compilation issue with Cow<'a, str>

This commit is contained in:
Kogia-sima 2020-12-21 14:02:35 +09:00
parent 0b8a19f5cc
commit d127eba2ee
1 changed files with 3 additions and 3 deletions

View File

@ -89,16 +89,16 @@ impl Render for String {
}
}
impl Render for &str {
impl Render for str {
#[inline]
fn render(&self, b: &mut Buffer) -> Result<(), RenderError> {
b.push_str(*self);
b.push_str(self);
Ok(())
}
#[inline]
fn render_escaped(&self, b: &mut Buffer) -> Result<(), RenderError> {
escape::escape_to_buf(*self, b);
escape::escape_to_buf(self, b);
Ok(())
}
}