@@ -243,16 +243,16 @@ impl Default for ProjectionStore {
243
243
}
244
244
245
245
impl ProjectionStore {
246
- fn shrink_to_fit ( & mut self ) {
246
+ pub fn shrink_to_fit ( & mut self ) {
247
247
self . id_to_proj . shrink_to_fit ( ) ;
248
248
self . proj_to_id . shrink_to_fit ( ) ;
249
249
}
250
250
251
- fn intern_if_exist ( & self , projection : & [ PlaceElem ] ) -> Option < ProjectionId > {
251
+ pub fn intern_if_exist ( & self , projection : & [ PlaceElem ] ) -> Option < ProjectionId > {
252
252
self . proj_to_id . get ( projection) . copied ( )
253
253
}
254
254
255
- fn intern ( & mut self , projection : Box < [ PlaceElem ] > ) -> ProjectionId {
255
+ pub fn intern ( & mut self , projection : Box < [ PlaceElem ] > ) -> ProjectionId {
256
256
let new_id = ProjectionId ( self . proj_to_id . len ( ) as u32 ) ;
257
257
match self . proj_to_id . entry ( projection) {
258
258
Entry :: Occupied ( id) => * id. get ( ) ,
@@ -267,13 +267,13 @@ impl ProjectionStore {
267
267
}
268
268
269
269
impl ProjectionId {
270
- const EMPTY : ProjectionId = ProjectionId ( 0 ) ;
270
+ pub const EMPTY : ProjectionId = ProjectionId ( 0 ) ;
271
271
272
- fn lookup ( self , store : & ProjectionStore ) -> & [ PlaceElem ] {
272
+ pub fn lookup ( self , store : & ProjectionStore ) -> & [ PlaceElem ] {
273
273
store. id_to_proj . get ( & self ) . unwrap ( )
274
274
}
275
275
276
- fn project ( self , projection : PlaceElem , store : & mut ProjectionStore ) -> ProjectionId {
276
+ pub fn project ( self , projection : PlaceElem , store : & mut ProjectionStore ) -> ProjectionId {
277
277
let mut current = self . lookup ( store) . to_vec ( ) ;
278
278
current. push ( projection) ;
279
279
store. intern ( current. into ( ) )
0 commit comments