Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom encode_utf8 implementation in favor of standard one #2599

Merged
merged 1 commit into from Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions serde/src/de/mod.rs
Expand Up @@ -123,7 +123,6 @@ mod format;
mod ignored_any;
mod impls;
pub(crate) mod size_hint;
mod utf8;

pub use self::ignored_any::IgnoredAny;

Expand Down Expand Up @@ -1478,7 +1477,7 @@ pub trait Visitor<'de>: Sized {
where
E: Error,
{
self.visit_str(utf8::encode(v).as_str())
self.visit_str(v.encode_utf8(&mut [0u8; 4]))
}

/// The input contains a string. The lifetime of the string is ephemeral and
Expand Down
46 changes: 0 additions & 46 deletions serde/src/de/utf8.rs

This file was deleted.