diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-11-05 09:35:28 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-11-25 17:54:06 +1100 |
| commit | 7fe09a6551b72133e68911f3125f28642ec243ac (patch) | |
| tree | 864dde41a185342ee21c9214a9a85b9061473bda /src/librustc_data_structures | |
| parent | c86bbd4830410f19812ddbe4286ebb83ae043a4b (diff) | |
| download | rust-7fe09a6551b72133e68911f3125f28642ec243ac.tar.gz rust-7fe09a6551b72133e68911f3125f28642ec243ac.zip | |
Replace a `.truncate(0)` call with `.clear()`.
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/snapshot_map/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_data_structures/snapshot_map/mod.rs b/src/librustc_data_structures/snapshot_map/mod.rs index 2c36a549bac..6ad886625d8 100644 --- a/src/librustc_data_structures/snapshot_map/mod.rs +++ b/src/librustc_data_structures/snapshot_map/mod.rs @@ -106,7 +106,7 @@ impl<K, V> SnapshotMap<K, V> self.assert_open_snapshot(snapshot); if snapshot.len == 0 { // The root snapshot. - self.undo_log.truncate(0); + self.undo_log.clear(); } else { self.undo_log[snapshot.len] = UndoLog::CommittedSnapshot; } |
