Skip to content

Commit

Permalink
remove unnecessary to_string() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-guo committed Oct 23, 2023
1 parent 1383663 commit d59f3de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub fn spawn_with_output(input: proc_macro::TokenStream) -> proc_macro::TokenStr
/// let file = "bad_file";
/// cmd_die!("could not open file: $file");
/// // output:
/// // FATAL: could not open file: bad_file
/// // [ERROR] FATAL: could not open file: bad_file
/// ```
/// format should be string literals, and variable interpolation is supported.
/// Note that this macro is just for convenience. The process will exit with 1 and print
Expand Down
4 changes: 2 additions & 2 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ pub fn export_cmd(cmd: &'static str, func: FnFun) {
CMD_MAP.lock().unwrap().insert(OsString::from(cmd), func);
}

/// set debug mode or not, false by default
/// Set debug mode or not, false by default
///
/// Setting environment variable CMD_LIB_DEBUG=0|1 has the same effect
pub fn set_debug(enable: bool) {
std::env::set_var("CMD_LIB_DEBUG", if enable { "1" } else { "0" });
}

/// set pipefail or not, true by default
/// Set pipefail or not, true by default
///
/// Setting environment variable CMD_LIB_PIPEFAIL=0|1 has the same effect
pub fn set_pipefail(enable: bool) {
Expand Down

0 comments on commit d59f3de

Please sign in to comment.