Skip to content

Commit

Permalink
chore: update rust to v1.79.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Jul 11, 2024
1 parent 05d780f commit 4483dd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.77.0"
channel = "1.79.0"
profile = "default"
11 changes: 7 additions & 4 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -42,10 +45,10 @@ impl AsRef<str> 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 {
Expand Down

0 comments on commit 4483dd0

Please sign in to comment.