v2 / vlib / v / debug / tests / map_nested_ref_mut.vv
12 lines · 11 sloc · 213 bytes · 29e962749a17d85c52d72b7d29d808cf74d55c02
Raw
1import net
2
3fn main() {
4 mut con_list := map[string]map[string]&net.TcpConn{}
5 con_list['foo'] = {
6 'bar': &net.TcpConn{}
7 }
8 for _, mut connection in unsafe { con_list['foo'] } {
9 $dbg;
10 dump(connection)
11 }
12}
13