Cleanup warnings and lint checks

This commit is contained in:
Jeremy Wall 2023-08-14 21:20:07 -04:00
parent c5f339cd27
commit 4d33126c69
3 changed files with 7 additions and 12 deletions

2
Cargo.lock generated
View File

@ -295,7 +295,7 @@ dependencies = [
[[package]] [[package]]
name = "runwhen" name = "runwhen"
version = "0.0.6" version = "0.0.7"
dependencies = [ dependencies = [
"clap", "clap",
"humantime", "humantime",

View File

@ -2,29 +2,22 @@
description = "runwhen"; description = "runwhen";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
naersk.url = "github:nix-community/naersk"; naersk.url = "github:nix-community/naersk";
flake-compat = { flake-compat = {
url = github:edolstra/flake-compat; url = "github:edolstra/flake-compat";
flake = false; flake = false;
}; };
}; };
outputs = {self, nixpkgs, flake-utils, rust-overlay, naersk, flake-compat}: outputs = {self, flake-utils, naersk, flake-compat}:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
overlays = [ rust-overlay.overlay ];
pkgs = import nixpkgs { inherit system overlays; };
naersk-lib = naersk.lib."${system}"; naersk-lib = naersk.lib."${system}";
in in
{ {
defaultPackage = with pkgs; inherit flake-compat;
naersk-lib.buildPackage rec { defaultPackage = naersk-lib.buildPackage rec {
pname = "runwhen"; pname = "runwhen";
version = "0.0.6"; version = "0.0.6";
src = ./.; src = ./.;

View File

@ -95,6 +95,8 @@ impl CancelableProcess {
} }
} }
// NOTE(jwall): We want to actually use this some time when we figure out if it can be made to not block or not.
#[allow(dead_code)]
pub fn check(&mut self) -> Result<Option<i32>, CommandError> { pub fn check(&mut self) -> Result<Option<i32>, CommandError> {
Ok(match self.handle { Ok(match self.handle {
// TODO(jwall): This appears to block the thread despite the documenation. Figure out if this is fixable or not. // TODO(jwall): This appears to block the thread despite the documenation. Figure out if this is fixable or not.