Skip to content

Commit 7fe09a6

Browse files
committed
Replace a .truncate(0) call with .clear().
1 parent c86bbd4 commit 7fe09a6

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_data_structures/snapshot_map

1 file changed

+1
-1
lines changed

src/librustc_data_structures/snapshot_map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<K, V> SnapshotMap<K, V>
106106
self.assert_open_snapshot(snapshot);
107107
if snapshot.len == 0 {
108108
// The root snapshot.
109-
self.undo_log.truncate(0);
109+
self.undo_log.clear();
110110
} else {
111111
self.undo_log[snapshot.len] = UndoLog::CommittedSnapshot;
112112
}

0 commit comments

Comments
 (0)