pub fn open(url: &str) -> Result<Child> {
    let command = if cfg!(target_os = "linux") {
        Command::new("xdg-open")
    } else if cfg!(target_os = "macos") {
        let mut command = Command::new("open");
        command.arg("-g");
        command
    } else if cfg!(target_os = "windows") {
        Command::new("explorer")
    } else {
        bail!("unsupported OS: set a browser to use explicitly")
    };
    open_specific(url, command)
}
/// Opens a browser window at the specified URL in a new process.
///
/// This function uses platform-specific utilities to determine the user's default browser. The
/// following platforms are supported:
///
/// | Platform | Program    |
/// | -------- | ---------- |
/// | Linux    | `xdg-open` |
/// | OS X     | `open -g`  |
/// | Windows  | `explorer` |
///
/// # Panics
/// Panics if called on an unsupported operating system.
Opens a browser window at the specified URL in a new process.
This function uses platform-specific utilities to determine the user's default browser. The
following platforms are supported.


Opens a browser window at the specified URL in a new process . This function uses platform - specific utilities to determine the user ' s default browser . The following platforms are supported .
pub fn open(url: &str) -> Result<Child> {
    let command = if cfg!(target_os = "linux") {
        Command::new("xdg-open")
    } else if cfg!(target_os = "macos") {
        let mut command = Command::new("open");
        command.arg("-g");
        command
    } else if cfg!(target_os = "windows") {
        Command::new("explorer")
    } else {
        bail!("unsupported OS: set a browser to use explicitly")
    };
    open_specific(url, command)
}
pub fn open ( url : & str ) -> Result < Child > { let command = if cfg ! ( target_os " " ) { Command :: new ( " " ) } else if cfg ! ( target_os " " ) { let mut command = Command :: new ( " " ) ; command . arg ( " " ) ; command } else if cfg ! ( target_os " " ) { Command :: new ( " " ) } else { bail ! ( " " ) } ; open_specific ( url , command ) }
Opens a browser window at the specified URL in a new process.
Opens a browser window at the specified URL in a new process .
url
&str
url
&str
panics
Panics if called on an unsupported operating system.
Panics if called on an unsupported operating system .