Closed erenon closed 1 month ago
Instead of a Vec, to avoid forcing an allocation.
cmsg_space! now creates a zero initialized vec (instead of a zero-len vec with capacity): this way callsites do not need to be changed.
cmsg_space!
I tried to change cmsg_space! to create a fixed sized array (instead of a Vec) but run into:
error: constant expression depends on a generic parameter --> test/sys/test_socket.rs:2907:26 | 2907 | let mut cspace = cmsg_space!(libc::sock_extended_err, SA); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes #2523
Instead of a Vec, to avoid forcing an allocation.
cmsg_space!
now creates a zero initialized vec (instead of a zero-len vec with capacity): this way callsites do not need to be changed.I tried to change
cmsg_space!
to create a fixed sized array (instead of a Vec) but run into:Fixes #2523