chromedriver-launch 0.1.2

A crate for launching a chromedriver process.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (C) 2025 Daniel Mueller <deso@posteo.net>
// SPDX-License-Identifier: GPL-3.0-or-later

use std::io;


/// Check the return value of a system call.
pub(crate) fn check<T>(result: T, error: T) -> io::Result<()>
where
  T: Copy + PartialOrd<T>,
{
  if result == error {
    Err(io::Error::last_os_error())
  } else {
    Ok(())
  }
}