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