Function std::clone::clone

Overview
fn clone(value: any) -> any

Clone the specified value.

Examples

let a = 42;
let b = a;
let c = clone(a);

a += 1;

assert_eq!(a, 43);
assert_eq!(b, 42);
assert_eq!(c, 42);