Seems that Vec.concat should be available
https://docs.rs/soroban-sdk/0.8.7/soroban_sdk/struct.Vec.html#method.concat
yet...(see attached image)
Vec is a sequential and indexable growable collection type.
5 messages · Page 1 of 1 (latest)
Seems that Vec.concat should be available
https://docs.rs/soroban-sdk/0.8.7/soroban_sdk/struct.Vec.html#method.concat
yet...(see attached image)
Vec is a sequential and indexable growable collection type.
It seems to be only for a Vec of Vecs.
let v = vec![&env, vec![&env, 1], vec![&env, 2]];
println!("{:?}",v.concat()) // prints: Vec(Ok(1), Ok(2))
concat concatenates two vectors of the same type, so it makes sense. In rust std you can also do [vec_1, vec_2].concat() but this will not yield a soroban vec, so the sdk needs to rely on their own type for concat() which is in fact a vector