From 33b02c868d182101c99891ece39d43b4244f5b1b Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Sun, 27 Apr 2025 17:08:50 +0100 Subject: [PATCH] chore(rust): upgrade to 1.83.0 This is needed for std::io::ErrorKind::DirectoryNotEmpty --- Cargo.toml | 2 +- flake.nix | 2 +- rust-toolchain.toml | 2 +- src/database/key_value/sending.rs | 4 ++-- src/utils/mod.rs | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f120b014..d352ce7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ repository = "https://gitlab.com/famedly/conduit" version = "0.10.0-alpha" # See also `rust-toolchain.toml` -rust-version = "1.81.0" +rust-version = "1.83.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/flake.nix b/flake.nix index 6ab922bb..0131b89e 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,7 @@ file = ./rust-toolchain.toml; # See also `rust-toolchain.toml` - sha256 = "sha256-VZZnlyP69+Y3crrLHQyJirqlHrTtGTsyiSnZB8jEvVo="; + sha256 = "sha256-s1RPtyvDGJaX/BisLT+ifVfuhDT1nZkZ1NcK8sbwELM="; }; }); in diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 465ffdee..c5259d2a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -9,7 +9,7 @@ # If you're having trouble making the relevant changes, bug a maintainer. [toolchain] -channel = "1.81.0" +channel = "1.83.0" components = [ # For rust-analyzer "rust-src", diff --git a/src/database/key_value/sending.rs b/src/database/key_value/sending.rs index 3fc3e042..b7064610 100644 --- a/src/database/key_value/sending.rs +++ b/src/database/key_value/sending.rs @@ -89,11 +89,11 @@ impl service::sending::Data for KeyValueDatabase { outgoing_kind: &OutgoingKind, ) -> Box)>> + 'a> { let prefix = outgoing_kind.get_prefix(); - return Box::new( + Box::new( self.servernameevent_data .scan_prefix(prefix) .map(|(k, v)| parse_servercurrentevent(&k, v).map(|(_, ev)| (ev, k))), - ); + ) } fn mark_as_active(&self, events: &[(SendingEventType, Vec)]) -> Result<()> { diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 69ec809f..8cab3762 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -134,7 +134,7 @@ pub fn deserialize_from_str< deserializer: D, ) -> Result { struct Visitor, E>(std::marker::PhantomData); - impl<'de, T: FromStr, Err: fmt::Display> serde::de::Visitor<'de> for Visitor { + impl, Err: fmt::Display> serde::de::Visitor<'_> for Visitor { type Value = T; fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { write!(formatter, "a parsable string") @@ -156,7 +156,7 @@ pub fn deserialize_from_str< /// string when passed to a format string. pub struct HtmlEscape<'a>(pub &'a str); -impl<'a> fmt::Display for HtmlEscape<'a> { +impl fmt::Display for HtmlEscape<'_> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { // Because the internet is always right, turns out there's not that many // characters to escape: http://stackoverflow.com/questions/7381974