limits_rs/default/
mod.rs

1/// A placeholder for the `struct Limit` type of unsupported operating systems.
2pub struct Limits();
3
4/// Always return an `UnsupportedOS` error for unsupported operating systems.
5pub fn get_pid_limits(pid: u32) -> Result<Limits, crate::Error> {
6    Err(crate::Error::UnsupportedOS)
7}
8
9#[cfg(test)]
10mod tests {
11    #[test]
12    fn test_unimplemented() {
13        let result = crate::get_pid_limits(0).unwrap_err();
14        let expected = crate::Error::UnsupportedOS;
15
16        assert_eq!(result, expected);
17    }
18}