about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-11-05 09:35:28 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-11-25 17:54:06 +1100
commit7fe09a6551b72133e68911f3125f28642ec243ac (patch)
tree864dde41a185342ee21c9214a9a85b9061473bda /src/librustc_data_structures
parentc86bbd4830410f19812ddbe4286ebb83ae043a4b (diff)
downloadrust-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.rs2
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;
         }