File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,16 +20,15 @@ mod marker {
2020 pub const F64 : u8 = 0xfb ;
2121}
2222
23- // Copy from cbor4ii/src/utils.rs.
23+ // Based on cbor4ii/src/utils.rs.
2424/// An in-memory reader.
2525struct SliceReader < ' a > {
2626 buf : & ' a [ u8 ] ,
27- limit : usize ,
2827}
2928
3029impl SliceReader < ' _ > {
3130 fn new ( buf : & [ u8 ] ) -> SliceReader < ' _ > {
32- SliceReader { buf, limit : 256 }
31+ SliceReader { buf }
3332 }
3433}
3534
@@ -47,21 +46,6 @@ impl<'de> dec::Read<'de> for SliceReader<'de> {
4746 let len = core:: cmp:: min ( self . buf . len ( ) , n) ;
4847 self . buf = & self . buf [ len..] ;
4948 }
50-
51- #[ inline]
52- fn step_in ( & mut self ) -> bool {
53- if let Some ( limit) = self . limit . checked_sub ( 1 ) {
54- self . limit = limit;
55- true
56- } else {
57- false
58- }
59- }
60-
61- #[ inline]
62- fn step_out ( & mut self ) {
63- self . limit += 1 ;
64- }
6549}
6650
6751fn cid_hash_to_pydict < ' py > ( py : Python < ' py > , cid : & Cid ) -> Bound < ' py , PyDict > {
You can’t perform that action at this time.
0 commit comments