Function clone [src]
Clones an Mutable and returns a new Mutable with the same value. The new Mutable is a deep copy and
can be modified separately from the original.
Asserts that limbs is big enough to store the value.
Prototype
pub fn clone(other: Mutable, limbs: []Limb) Mutable
Parameters
other: Mutable
limbs: []Limb
Source
pub fn clone(other: Mutable, limbs: []Limb) Mutable {
@memcpy(limbs[0..other.len], other.limbs[0..other.len]);
return .{
.limbs = limbs,
.len = other.len,
.positive = other.positive,
};
}