diff --git a/src/encoding/url.rs b/src/encoding/url.rs index 74c9432..54a55a8 100644 --- a/src/encoding/url.rs +++ b/src/encoding/url.rs @@ -175,9 +175,9 @@ pub fn percent_encode_to_buf(buf: &mut String, bytes: &B) where B: AsRef<[u8]> + ?Sized, { - use crate::{convert::result_elim, sink::StringSink}; + use crate::{convert::result_elim, sink::SinkString}; - let sink = StringSink::from_string_mut(buf); + let sink = SinkString::from_string_mut(buf); result_elim(percent_encode_to(sink, bytes)) } diff --git a/src/sink.rs b/src/sink.rs index 30d5bbf..dc2f825 100644 --- a/src/sink.rs +++ b/src/sink.rs @@ -30,7 +30,7 @@ where } #[cfg(feature = "alloc")] -pub use string_sink::StringSink; +pub use string_sink::SinkString; #[cfg(feature = "alloc")] mod string_sink { @@ -43,9 +43,9 @@ mod string_sink { #[repr(transparent)] #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] - pub struct StringSink(pub String); + pub struct SinkString(pub String); - impl StringSink { + impl SinkString { #[inline] #[must_use] pub fn from_string_ref(s: &String) -> &Self { @@ -65,21 +65,21 @@ mod string_sink { } } - impl AsRef for String { + impl AsRef for String { #[inline] - fn as_ref(&self) -> &StringSink { - StringSink::from_string_ref(self) + fn as_ref(&self) -> &SinkString { + SinkString::from_string_ref(self) } } - impl AsMut for String { + impl AsMut for String { #[inline] - fn as_mut(&mut self) -> &mut StringSink { - StringSink::from_string_mut(self) + fn as_mut(&mut self) -> &mut SinkString { + SinkString::from_string_mut(self) } } - impl StrSink for StringSink { + impl StrSink for SinkString { type Error = Infallible; #[inline]