restore_from_nodes

Function restore_from_nodes 

Source
pub fn restore_from_nodes(
    file_path: &Path,
    nodes: &[BackupNode],
    _state_dir: &Path,
) -> Result<()>
Expand description

Restore nodes from backup

This function restores AST nodes from backup by:

  1. Parsing the current file into an AST
  2. For each backup node, finding and replacing the corresponding node in the AST
  3. Writing the restored content back to the file