projects
/
Mitarbeiter
/
Tim-Zeitz
/
stud-rust-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor
[Mitarbeiter/Tim-Zeitz/stud-rust-base.git]
/
src
/
bin
/
encode_vector.rs
diff --git
a/src/bin/encode_vector.rs
b/src/bin/encode_vector.rs
index a51a63ad04c9904576714055d351611d117eb8b7..d8235bdaf09deed3dac26bb966b08da015974e42 100644
(file)
--- a/
src/bin/encode_vector.rs
+++ b/
src/bin/encode_vector.rs
@@
-2,10
+2,7
@@
use stud_rust_base::{io::*, cli::CliErr};
use std::{env, error::Error};
fn main() -> Result<(), Box<dyn Error>> {
use std::{env, error::Error};
fn main() -> Result<(), Box<dyn Error>> {
- let mut args = env::args();
- args.next();
-
- match &args.collect::<Vec<String>>()[..] {
+ match &env::args().skip(1).collect::<Vec<String>>()[..] {
[data_type, output] => {
match data_type.as_ref() {
"i8" => { parse_input::<i8>()?.write_to(output)?; Ok(()) },
[data_type, output] => {
match data_type.as_ref() {
"i8" => { parse_input::<i8>()?.write_to(output)?; Ok(()) },