mirror of
https://github.com/bahdotsh/wrkflw.git
synced 2026-02-24 11:59:49 +01:00
- Remove unused io::self import from common scope - Remove unused std::fs::OpenOptions and std::io::Write from windows_impl - Add std::io import to unix_impl to fix io::Error references - Ensure clippy passes with -D warnings on all platforms
wrkflw-utils
Shared helpers used across crates.
- Workflow file detection (
.github/workflows/*.yml,.gitlab-ci.yml) - File-descriptor redirection utilities for silencing noisy subprocess output (Unix only; Windows support is limited)
Example
use std::path::Path;
use wrkflw_utils::{is_workflow_file, fd::with_stderr_to_null};
assert!(is_workflow_file(Path::new(".github/workflows/ci.yml")));
let value = with_stderr_to_null(|| {
eprintln!("this is hidden on Unix, visible on Windows");
42
}).unwrap();
assert_eq!(value, 42);