Corrected minor non-idiomatic snippet of code (#3108)
* Corrected minor non-idiomaticity. * Added to CONTRIBUTORS.
This commit is contained in:
parent
7121cb5132
commit
3cd8c5700b
@ -169,6 +169,7 @@ Vasll <github.com/vasll>
|
||||
laalsaas <laalsaas@systemli.org>
|
||||
ijqq <ijqq@protonmail.ch>
|
||||
AntoineQ1 <https://github.com/AntoineQ1>
|
||||
jthulhu <https://github.com/jthulhu>
|
||||
********************
|
||||
|
||||
The text of the 3 clause BSD license follows:
|
||||
|
@ -2,6 +2,7 @@
|
||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
use std::ffi::OsStr;
|
||||
use std::iter::once;
|
||||
use std::process::Command;
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
@ -96,8 +97,7 @@ impl CommandExt for Command {
|
||||
}
|
||||
|
||||
fn get_cmdline(arg: &mut Command) -> String {
|
||||
[arg.get_program().to_string_lossy()]
|
||||
.into_iter()
|
||||
once(arg.get_program().to_string_lossy())
|
||||
.chain(arg.get_args().map(|arg| arg.to_string_lossy()))
|
||||
.join(" ")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user