From 896ac3450604c610030ef3e2412d1eaa289ea96e Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Sat, 19 Oct 2024 16:38:46 +0200 Subject: [PATCH 1/2] crane: fail build on warnings --- flake.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ae14d56..bff0fff 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,11 @@ # upstream ideally) so this interface might be brittle, but avoids # accidentally passing a detached nixpkgs from its flake (or its follows) # on to consumers. - craneLib = crane.mkLib final; + craneLib = (crane.mkLib final).overrideScope (_: scopePrev: { + mkCargoDerivation = args: scopePrev.mkCargoDerivation ({ + RUSTFLAGS = "-D warnings"; + } // args); + }); }; in { packages.${system}.${pname} = pkgs.${pname}; From 197d3c5cff63fd5686e85a8ed3fe126288745d64 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Sat, 19 Oct 2024 17:10:27 +0200 Subject: [PATCH 2/2] issuer/resolvererror: allow enum tuple field to never appear to be read --- src/issuer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/issuer.rs b/src/issuer.rs index 9a2a0e9..509a517 100644 --- a/src/issuer.rs +++ b/src/issuer.rs @@ -240,7 +240,10 @@ impl std::convert::From for IssuerError { #[derive(Debug)] enum ResolverError<'l> { SystemResolveConf, - NoIpsForResolversFound(&'l String), + NoIpsForResolversFound( + #[allow(dead_code)] + &'l String + ), Other }