Module cpp_to_rust_common::utils [] [src]

Various utilities.

Traits

MapIfOk

Perform a map operation that can fail

Functions

add_env_path_item

Reads environment variable env_var_name, adds new_paths to acquired list of paths and returns the list formatted as path list (without applying it).

add_to_multihash

Creates and empty collection at hash[key] if there isn't one already. Adds value to hash[key] collection.

exe_suffix

Returns proper executable file suffix on current platform. Returns ".exe" on Windows and "" on other platforms.

get_command_output

Runs a command and returns its stdout if it was successful

run_command

Runs a command and checks that it was successful