diff --git a/Cargo.toml b/Cargo.toml index 04ff4bb7..c656e183 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -867,7 +867,7 @@ unused-qualifications = "warn" #unused-results = "warn" # TODO ## some sadness -mismatched_lifetime_syntaxes = "allow" # TODO! +elided_named_lifetimes = "allow" # TODO! let_underscore_drop = "allow" missing_docs = "allow" # cfgs cannot be limited to expected cfgs or their de facto non-transitive/opt-in use-case e.g. @@ -1006,6 +1006,3 @@ literal_string_with_formatting_args = { level = "allow", priority = 1 } needless_raw_string_hashes = "allow" - -# TODO: Enable this lint & fix all instances -collapsible_if = "allow" diff --git a/flake.lock b/flake.lock index 4c2bf9fb..4af82c75 100644 --- a/flake.lock +++ b/flake.lock @@ -153,11 +153,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1755585599, - "narHash": "sha256-tl/0cnsqB/Yt7DbaGMel2RLa7QG5elA8lkaOXli6VdY=", + "lastModified": 1751525020, + "narHash": "sha256-oDO6lCYS5Bf4jUITChj9XV7k3TP38DE0Ckz5n5ORCME=", "owner": "nix-community", "repo": "fenix", - "rev": "6ed03ef4c8ec36d193c18e06b9ecddde78fb7e42", + "rev": "a1a5f92f47787e7df9f30e5e5ac13e679215aa1e", "type": "github" }, "original": { @@ -546,11 +546,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1755504847, - "narHash": "sha256-VX0B9hwhJypCGqncVVLC+SmeMVd/GAYbJZ0MiiUn2Pk=", + "lastModified": 1751433876, + "narHash": "sha256-IsdwOcvLLDDlkFNwhdD5BZy20okIQL01+UQ7Kxbqh8s=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "a905e3b21b144d77e1b304e49f3264f6f8d4db75", + "rev": "11d45c881389dae90b0da5a94cde52c79d0fc7ef", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d6beb84e..f0dcb6fb 100644 --- a/flake.nix +++ b/flake.nix @@ -31,17 +31,13 @@ inherit system; }; - fnx = inputs.fenix.packages.${system}; # The Rust toolchain to use - toolchain = fnx.combine [ - (fnx.fromToolchainFile { - file = ./rust-toolchain.toml; + toolchain = inputs.fenix.packages.${system}.fromToolchainFile { + file = ./rust-toolchain.toml; - # See also `rust-toolchain.toml` - sha256 = "sha256-+9FmLhAOezBZCOziO0Qct1NOrfpjNsXxc/8I0c7BdKE="; - }) - fnx.complete.rustfmt - ]; + # See also `rust-toolchain.toml` + sha256 = "sha256-KUm16pHj+cRedf8vxs/Hd2YWxpOrWZ7UOrwhILdSJBU="; + }; mkScope = pkgs: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 63e9d9ce..bdb608aa 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -9,16 +9,13 @@ # If you're having trouble making the relevant changes, bug a maintainer. [toolchain] +channel = "1.87.0" profile = "minimal" -channel = "1.89.0" components = [ # For rust-analyzer "rust-src", "rust-analyzer", # For CI and editors + "rustfmt", "clippy", - # you have to install rustfmt nightly yourself (if you're not on NixOS) - # - # The rust-toolchain.toml file doesn't provide any syntax for specifying components from different toolchains - # "rustfmt" ] diff --git a/src/api/client/sync/v4.rs b/src/api/client/sync/v4.rs index a16e4526..14cd50d8 100644 --- a/src/api/client/sync/v4.rs +++ b/src/api/client/sync/v4.rs @@ -45,7 +45,6 @@ use crate::{ type TodoRooms = BTreeMap, usize, u64)>; const SINGLE_CONNECTION_SYNC: &str = "single_connection_sync"; -#[allow(clippy::cognitive_complexity)] /// POST `/_matrix/client/unstable/org.matrix.msc3575/sync` /// /// Sliding Sync endpoint (future endpoint: `/_matrix/client/v4/sync`) diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 0708196d..aa021be7 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -1,4 +1,3 @@ -#![allow(clippy::doc_link_with_quotes)] pub mod check; pub mod manager; pub mod proxy; diff --git a/src/core/debug.rs b/src/core/debug.rs index c728278d..21a5ada4 100644 --- a/src/core/debug.rs +++ b/src/core/debug.rs @@ -100,7 +100,7 @@ pub fn trap() { #[must_use] pub fn panic_str(p: &Box) -> &'static str { - (**p).downcast_ref::<&str>().copied().unwrap_or_default() + p.downcast_ref::<&str>().copied().unwrap_or_default() } #[inline(always)] diff --git a/src/router/serve/unix.rs b/src/router/serve/unix.rs index 9bb3dd6e..2af17274 100644 --- a/src/router/serve/unix.rs +++ b/src/router/serve/unix.rs @@ -30,7 +30,7 @@ use tower::{Service, ServiceExt}; type MakeService = IntoMakeServiceWithConnectInfo; -const NULL_ADDR: net::SocketAddr = net::SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0); +const NULL_ADDR: net::SocketAddr = net::SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0); const FINI_POLL_INTERVAL: Duration = Duration::from_millis(750); #[tracing::instrument(skip_all, level = "debug")]