diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2fe891c..7ae2b72 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.77.0" +channel = "1.79.0" profile = "default" diff --git a/src/ffi.rs b/src/ffi.rs index 94fc93f..a8e03ef 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -3,6 +3,7 @@ use core::ffi::{c_char, c_uint}; #[cfg(feature = "std")] extern crate std; +use std::fmt::Display; #[repr(C)] pub struct ada_url { @@ -42,10 +43,10 @@ impl AsRef for ada_owned_string { } #[cfg(feature = "std")] -impl ToString for ada_owned_string { - fn to_string(&self) -> std::string::String { - self.as_ref().to_owned() - } +impl Display for ada_owned_string { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_ref().to_owned()) + } } impl Drop for ada_owned_string {