Skip to content

Commit f30cb16

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

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
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: 6 additions & 3 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,9 +45,9 @@ 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+
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())
4851
}
4952
}
5053

0 commit comments

Comments
 (0)