@@ -7,12 +7,12 @@ use std::ffi::CString;
77
88use libc:: { c_char, c_int, c_uint, c_void, size_t} ;
99
10+ use crate :: odb_backend:: { CustomOdbBackend , OdbBackend } ;
1011use crate :: panic;
1112use crate :: util:: Binding ;
1213use crate :: {
1314 raw, Error , IndexerProgress , Mempack , Object , ObjectType , OdbLookupFlags , Oid , Progress ,
1415} ;
15- use crate :: odb_backend:: { CustomOdbBackend , OdbBackend } ;
1616
1717/// A structure to represent a git object database
1818pub struct Odb < ' repo > {
@@ -275,10 +275,18 @@ impl<'repo> Odb<'repo> {
275275 /// Returns a handle to the backend.
276276 ///
277277 /// `backend` will be dropped when this Odb is dropped.
278- pub fn add_custom_backend < ' odb , B : OdbBackend + ' odb > ( & ' odb self , backend : B , priority : i32 ) -> Result < CustomOdbBackend < ' odb , B > , Error > {
278+ pub fn add_custom_backend < ' odb , B : OdbBackend + ' odb > (
279+ & ' odb self ,
280+ backend : B ,
281+ priority : i32 ,
282+ ) -> Result < CustomOdbBackend < ' odb , B > , Error > {
279283 let mut inner = CustomOdbBackend :: new_inner ( backend) ;
280284 unsafe {
281- try_call ! ( raw:: git_odb_add_backend( self . raw, ptr:: from_mut( inner. as_mut( ) ) . cast( ) , priority as c_int) ) ;
285+ try_call ! ( raw:: git_odb_add_backend(
286+ self . raw,
287+ ptr:: from_mut( inner. as_mut( ) ) . cast( ) ,
288+ priority as c_int
289+ ) ) ;
282290 Ok ( CustomOdbBackend :: new ( inner) )
283291 }
284292 }
0 commit comments