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..a7bab7d 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -4,6 +4,9 @@ use core::ffi::{c_char, c_uint}; #[cfg(feature = "std")] extern crate std; +#[cfg(feature = "std")] +use std::fmt::Display; + #[repr(C)] pub struct ada_url { _unused: [u8; 0], @@ -42,9 +45,9 @@ 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()) } }