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]]
name = "runwhen"
version = "0.0.6"
version = "0.0.7"
dependencies = [
"clap",
"humantime",

View File

@ -2,29 +2,22 @@
description = "runwhen";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
naersk.url = "github:nix-community/naersk";
flake-compat = {
url = github:edolstra/flake-compat;
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = {self, nixpkgs, flake-utils, rust-overlay, naersk, flake-compat}:
outputs = {self, flake-utils, naersk, flake-compat}:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ rust-overlay.overlay ];
pkgs = import nixpkgs { inherit system overlays; };
naersk-lib = naersk.lib."${system}";
in
{
defaultPackage = with pkgs;
naersk-lib.buildPackage rec {
inherit flake-compat;
defaultPackage = naersk-lib.buildPackage rec {
pname = "runwhen";
version = "0.0.6";
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> {
Ok(match self.handle {
// TODO(jwall): This appears to block the thread despite the documenation. Figure out if this is fixable or not.