@@ -243,16 +243,16 @@ impl Default for ProjectionStore {
243243}
244244
245245impl ProjectionStore {
246- fn shrink_to_fit ( & mut self ) {
246+ pub fn shrink_to_fit ( & mut self ) {
247247 self . id_to_proj . shrink_to_fit ( ) ;
248248 self . proj_to_id . shrink_to_fit ( ) ;
249249 }
250250
251- fn intern_if_exist ( & self , projection : & [ PlaceElem ] ) -> Option < ProjectionId > {
251+ pub fn intern_if_exist ( & self , projection : & [ PlaceElem ] ) -> Option < ProjectionId > {
252252 self . proj_to_id . get ( projection) . copied ( )
253253 }
254254
255- fn intern ( & mut self , projection : Box < [ PlaceElem ] > ) -> ProjectionId {
255+ pub fn intern ( & mut self , projection : Box < [ PlaceElem ] > ) -> ProjectionId {
256256 let new_id = ProjectionId ( self . proj_to_id . len ( ) as u32 ) ;
257257 match self . proj_to_id . entry ( projection) {
258258 Entry :: Occupied ( id) => * id. get ( ) ,
@@ -267,13 +267,13 @@ impl ProjectionStore {
267267}
268268
269269impl ProjectionId {
270- const EMPTY : ProjectionId = ProjectionId ( 0 ) ;
270+ pub const EMPTY : ProjectionId = ProjectionId ( 0 ) ;
271271
272- fn lookup ( self , store : & ProjectionStore ) -> & [ PlaceElem ] {
272+ pub fn lookup ( self , store : & ProjectionStore ) -> & [ PlaceElem ] {
273273 store. id_to_proj . get ( & self ) . unwrap ( )
274274 }
275275
276- fn project ( self , projection : PlaceElem , store : & mut ProjectionStore ) -> ProjectionId {
276+ pub fn project ( self , projection : PlaceElem , store : & mut ProjectionStore ) -> ProjectionId {
277277 let mut current = self . lookup ( store) . to_vec ( ) ;
278278 current. push ( projection) ;
279279 store. intern ( current. into ( ) )
0 commit comments