Volatile::map and Volatile::map_mut use slightly different `F` bounds?
Closed this issue · 1 comments
DianaNites commented
phil-opp commented
The map_mut
method is for &mut
references (e.g. Volatile<&mut u32>
) and gives full access to the wrapped value. The map
method, in constrast, only requires a shared &
reference (e.g. Volatile<&u32>
), but does not allow modification of the wrapped value.
(I'm not sure if I understood your question right, so please let me know if anything is still unclear.)