Skip to content

Commit f8d0b26

Browse files
committed
Remove custom encode_utf8 implementation in favor of standard one
1 parent 7007c1b commit f8d0b26

File tree

2 files changed

+1
-48
lines changed

2 files changed

+1
-48
lines changed

serde/src/de/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ mod format;
123123
mod ignored_any;
124124
mod impls;
125125
pub(crate) mod size_hint;
126-
mod utf8;
127126

128127
pub use self::ignored_any::IgnoredAny;
129128

@@ -1478,7 +1477,7 @@ pub trait Visitor<'de>: Sized {
14781477
where
14791478
E: Error,
14801479
{
1481-
self.visit_str(utf8::encode(v).as_str())
1480+
self.visit_str(v.encode_utf8(&mut [0u8; 4]))
14821481
}
14831482

14841483
/// The input contains a string. The lifetime of the string is ephemeral and

serde/src/de/utf8.rs

-46
This file was deleted.

0 commit comments

Comments
 (0)