mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-09 20:11:01 +00:00
This is not a bottleneck
This commit is contained in:
@@ -40,7 +40,6 @@ pub struct Encode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Encode {
|
impl Encode {
|
||||||
// FIXME: use this from_utf8_unchecked, since we know it can never fail
|
|
||||||
pub fn as_str(&self) -> &str {
|
pub fn as_str(&self) -> &str {
|
||||||
str::from_utf8(&self.buf[self.pos..]).unwrap()
|
str::from_utf8(&self.buf[self.pos..]).unwrap()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user