diff --git a/quic/s2n-quic-core/events/common.rs b/quic/s2n-quic-core/events/common.rs index ddcef360b..7f1c17309 100644 --- a/quic/s2n-quic-core/events/common.rs +++ b/quic/s2n-quic-core/events/common.rs @@ -592,7 +592,8 @@ struct ConnectionCloseFrame<'a> { impl<'a> ConnectionCloseFrame<'a> { /// Converts the reason to a UTF-8 `str`, including invalid characters pub fn reason_lossy_utf8(&self) -> Option> { - self.reason.map(|reason| String::from_utf8_lossy(reason)) + self.reason + .map(|reason| alloc::string::String::from_utf8_lossy(reason)) } } diff --git a/quic/s2n-quic-core/src/event/generated.rs b/quic/s2n-quic-core/src/event/generated.rs index 9d0dd84e2..bc0d15f37 100644 --- a/quic/s2n-quic-core/src/event/generated.rs +++ b/quic/s2n-quic-core/src/event/generated.rs @@ -3398,7 +3398,8 @@ pub mod api { impl<'a> ConnectionCloseFrame<'a> { #[doc = " Converts the reason to a UTF-8 `str`, including invalid characters"] pub fn reason_lossy_utf8(&self) -> Option> { - self.reason.map(|reason| String::from_utf8_lossy(reason)) + self.reason + .map(|reason| alloc::string::String::from_utf8_lossy(reason)) } } impl<'a> IntoEvent> for &crate::frame::ConnectionClose<'a> {