rch 2.1.18

Remote Compilation Helper - PreToolUse hook CLI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::Path;

#[allow(dead_code)]
pub fn assert_contains(haystack: &str, needle: &str) {
    assert!(
        haystack.contains(needle),
        "Expected to find '{needle}' in output, got: {haystack}"
    );
}

#[allow(dead_code)]
pub fn assert_path_exists(path: &Path) {
    assert!(path.exists(), "Expected path to exist: {}", path.display());
}