Skip to main content

follow_pin_edit

Function follow_pin_edit 

Source
pub fn follow_pin_edit(
    base: &Value,
    after: &mut Value,
) -> Result<Vec<PinPointChange>, String>
Expand description

The user edited the SYMBOL (or its pins’ labels): carry the pin changes between base and after to the connection points and pads of after.

Each UNIT is diffed against its own port group. Within a unit, pins are matched by label first; a label in both lists is the same pin. What remains pairs up in place (see [diff_labels]): a label that left and one that arrived between the same two unchanged pins is a RENAME, and its point is renamed. A label that only left removes its point. A label that only arrived pairs with a point of that group already carrying it, or gets a new point in it (the group is created when the part declares none). Pads follow a rename.

Err holds the edit (see the module docs) and leaves after untouched.