Skip to content

Commit e994207

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

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use core::ffi::{c_char, c_uint};
33

44
#[cfg(feature = "std")]
55
extern crate std;
6+
use std::fmt::Display;
67

78
#[repr(C)]
89
pub struct ada_url {
@@ -42,10 +43,10 @@ impl AsRef<str> for ada_owned_string {
4243
}
4344

4445
#[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-
}
46+
impl Display for ada_owned_string {
47+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
48+
write!(f, "{}", self.as_ref().to_owned())
49+
}
4950
}
5051

5152
impl Drop for ada_owned_string {

0 commit comments

Comments
 (0)