running-process 4.6.2

Subprocess and PTY runtime for the running-process project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub(super) fn matches<T: Eq>(expected: &T, observed: Option<&T>) -> bool {
    observed == Some(expected)
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn pid_present_with_different_identity_is_not_the_spawned_process() {
        assert!(!matches(&100_u64, Some(&200_u64)));
    }

    #[test]
    fn matching_identity_is_the_spawned_process() {
        assert!(matches(&100_u64, Some(&100_u64)));
    }
}