Skip to content

Commit 4483dd0

Browse files
committed
chore: update rust to v1.79.0
1 parent 05d780f commit 4483dd0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.77.0"
2+
channel = "1.79.0"
33
profile = "default"

src/ffi.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ use core::ffi::{c_char, c_uint};
44
#[cfg(feature = "std")]
55
extern crate std;
66

7+
#[cfg(feature = "std")]
8+
use std::fmt::Display;
9+
710
#[repr(C)]
811
pub struct ada_url {
912
_unused: [u8; 0],
@@ -42,10 +45,10 @@ impl AsRef<str> for ada_owned_string {
4245
}
4346

4447
#[cfg(feature = "std")]
45-
impl ToString for ada_owned_string {
46-
fn to_string(&self) -> std::string::String {
47-
self.as_ref().to_owned()
48-
}
48+
impl Display for ada_owned_string {
49+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
50+
write!(f, "{}", self.as_ref().to_owned())
51+
}
4952
}
5053

5154
impl Drop for ada_owned_string {

0 commit comments

Comments
 (0)