Skip to main content

set_value

Function set_value 

Source
pub fn set_value(slot: &mut Value, new: Value)
Expand description

Change a value, keeping the decor it was written with.

Dropping a new Item over an old one discards its decor, which is the whitespace and the comments attached to it, so the value is assigned into and its decor put back afterwards.