File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 3333
3434use std:: marker;
3535use std:: fmt:: Debug ;
36+ use std:: ops:: Range ;
3637
3738mod backing_vec;
3839pub use self :: backing_vec:: { InPlace , UnificationStore } ;
@@ -299,6 +300,15 @@ impl<S: UnificationStore> UnificationTable<S> {
299300 self . values . len ( )
300301 }
301302
303+ /// Returns the keys of all variables created since the `snapshot`.
304+ pub fn vars_since_snapshot (
305+ & self ,
306+ snapshot : & Snapshot < S > ,
307+ ) -> Range < S :: Key > {
308+ let range = self . values . values_since_snapshot ( & snapshot. snapshot ) ;
309+ S :: Key :: from_index ( range. start as u32 ) ..S :: Key :: from_index ( range. end as u32 )
310+ }
311+
302312 /// Obtains the current value for a particular key.
303313 /// Not for end-users; they can use `probe_value`.
304314 fn value ( & self , key : S :: Key ) -> & VarValue < S :: Key > {
You can’t perform that action at this time.
0 commit comments