simplify option_vec_printer
This commit is contained in:
parent
484267c1a4
commit
d97c149e1f
@ -248,7 +248,8 @@ where
|
|||||||
T: Clone,
|
T: Clone,
|
||||||
{
|
{
|
||||||
let max_i: i32 = (data.len() as i32) - 1;
|
let max_i: i32 = (data.len() as i32) - 1;
|
||||||
let output: String = data
|
"[".to_owned()
|
||||||
|
+ &data
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(i, x)| {
|
.map(|(i, x)| {
|
||||||
@ -264,9 +265,8 @@ where
|
|||||||
tmp
|
tmp
|
||||||
})
|
})
|
||||||
.collect::<Vec<String>>()
|
.collect::<Vec<String>>()
|
||||||
.concat();
|
.concat()
|
||||||
|
+ "]"
|
||||||
format!("[{}]", output)
|
|
||||||
}
|
}
|
||||||
// Returns a vector of length `max_i` starting at value `min_x` with resolution
|
// Returns a vector of length `max_i` starting at value `min_x` with resolution
|
||||||
// of `resolution`
|
// of `resolution`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user