File tree 2 files changed +21
-4
lines changed
gix-odb/src/store_impls/dynamic
2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ pub use error::Error;
78
78
use gix_features:: zlib;
79
79
80
80
use crate :: store:: types:: PackId ;
81
- use gix_object:: { Exists , Find } ;
82
81
83
82
impl < S > super :: Handle < S >
84
83
where
@@ -499,7 +498,7 @@ where
499
498
}
500
499
}
501
500
502
- impl < S > Find for super :: Handle < S >
501
+ impl < S > gix_object :: Find for super :: Handle < S >
503
502
where
504
503
S : Deref < Target = super :: Store > + Clone ,
505
504
Self : gix_pack:: Find ,
@@ -513,7 +512,25 @@ where
513
512
}
514
513
}
515
514
516
- impl < S > Exists for super :: Handle < S >
515
+ impl < S > gix_object:: FindHeader for super :: Handle < S >
516
+ where
517
+ S : Deref < Target = super :: Store > + Clone ,
518
+ {
519
+ fn try_header ( & self , id : & gix_hash:: oid ) -> Result < Option < gix_object:: Header > , gix_object:: find:: Error > {
520
+ let mut snapshot = self . snapshot . borrow_mut ( ) ;
521
+ let mut inflate = self . inflate . borrow_mut ( ) ;
522
+ self . try_header_inner ( id, & mut inflate, & mut snapshot, None )
523
+ . map ( |maybe_header| {
524
+ maybe_header. map ( |hdr| gix_object:: Header {
525
+ kind : hdr. kind ( ) ,
526
+ size : hdr. size ( ) ,
527
+ } )
528
+ } )
529
+ . map_err ( |err| Box :: new ( err) as _ )
530
+ }
531
+ }
532
+
533
+ impl < S > gix_object:: Exists for super :: Handle < S >
517
534
where
518
535
S : Deref < Target = super :: Store > + Clone ,
519
536
Self : gix_pack:: Find ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ impl<S> super::Handle<S>
13
13
where
14
14
S : Deref < Target = super :: Store > + Clone ,
15
15
{
16
- fn try_header_inner < ' b > (
16
+ pub ( crate ) fn try_header_inner < ' b > (
17
17
& ' b self ,
18
18
mut id : & ' b gix_hash:: oid ,
19
19
inflate : & mut zlib:: Inflate ,
You can’t perform that action at this time.
0 commit comments