fn replace_decorated(dest: &mut Value, new_value: impl Into<Value>) -> Value {
    let decor = dest.decor();
    let mut new_value = new_value.into();
    // Copy over the decor from dest into new_value.
    let new_decor = new_value.decor_mut();
    if let Some(prefix) = decor.prefix() {
        new_decor.set_prefix(prefix);
    }
    if let Some(suffix) = decor.suffix() {
        new_decor.set_suffix(suffix);
    }

    mem::replace(dest, new_value)
}
Replace the value while retaining the decor.
cargo-guppy/src/mv.rs