main: rework loop over changes

laumann
Oct 10, 2023, 8:37 PM
5ZSJEED77SE3LHU6S6RMBNRZPDDR3TFNXOM5SI23WIHKS6LHEHAAC

Dependencies

Change contents

  • replacement in src/main.rs at line 47
    [4.5695][4.98:130](),[4.1721][4.98:130](),[4.130][4.5696:5746](),[4.5746][4.246:303](),[4.303][2.2081:2150](),[2.2150][4.357:556](),[4.357][4.357:556]()
    for i in 0..changes.len() {
    sandbox.add_change(&changes[i]).unwrap();
    if !stream.already_exported(&changes[i].state) {
    let files = sandbox.get_files(changes[i].hash).unwrap();
    let parent = if i == 0 {
    None
    } else {
    Some(changes[i - 1].state)
    };
    stream.write_commit(&changes[i], parent, &files);
    [4.5695]
    [3.900]
    let mut parent = None;
    for ch in changes {
    sandbox.add_change(&ch).unwrap();
    if !stream.already_exported(&ch.state) {
    let files = sandbox.get_files(ch.hash).unwrap();
    stream.write_commit(&ch, parent, &files);
  • replacement in src/main.rs at line 59
    [3.1113][3.1113:1156]()
    count, changes[i].hash
    [3.1113]
    [3.1156]
    count, ch.hash
  • edit in src/main.rs at line 63
    [4.566]
    [4.566]
    parent = Some(ch.state)