File tree Expand file tree Collapse file tree 13 files changed +22
-22
lines changed Expand file tree Collapse file tree 13 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 33
33
}
34
34
}
35
35
36
- pub fn consume ( self ) -> BS {
36
+ pub fn into_inner ( self ) -> BS {
37
37
self . base
38
38
}
39
39
}
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ where
287
287
match kernel. block_create ( DAG_CBOR , params) {
288
288
Ok ( id) => id,
289
289
// This could fail if we pass some global memory limit.
290
- Err ( err) => return ( Err ( err) , kernel. take ( ) ) ,
290
+ Err ( err) => return ( Err ( err) , kernel. into_call_manager ( ) ) ,
291
291
}
292
292
} else {
293
293
super :: NO_DATA_BLOCK_ID
@@ -303,7 +303,7 @@ where
303
303
. or_fatal ( )
304
304
{
305
305
Ok ( ret) => ret,
306
- Err ( err) => return ( Err ( err) , store. into_data ( ) . kernel . take ( ) ) ,
306
+ Err ( err) => return ( Err ( err) , store. into_data ( ) . kernel . into_call_manager ( ) ) ,
307
307
} ;
308
308
309
309
// From this point on, there are no more syscall errors, only aborts.
@@ -335,7 +335,7 @@ where
335
335
336
336
let invocation_data = store. into_data ( ) ;
337
337
let last_error = invocation_data. last_error ;
338
- let mut cm = invocation_data. kernel . take ( ) ;
338
+ let mut cm = invocation_data. kernel . into_call_manager ( ) ;
339
339
340
340
// Process the result, updating the backtrace if necessary.
341
341
let ret = match result {
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ where
181
181
182
182
/// Consume consumes the executor and returns the Machine. If the Machine had
183
183
/// been poisoned during execution, the Option will be None.
184
- pub fn consume ( self ) -> Option < <K :: CallManager as CallManager >:: Machine > {
184
+ pub fn into_machine ( self ) -> Option < <K :: CallManager as CallManager >:: Machine > {
185
185
self . 0
186
186
}
187
187
Original file line number Diff line number Diff line change 76
76
{
77
77
type CallManager = C ;
78
78
79
- fn take ( self ) -> Self :: CallManager
79
+ fn into_call_manager ( self ) -> Self :: CallManager
80
80
where
81
81
Self : Sized ,
82
82
{
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub trait Kernel:
45
45
type CallManager : CallManager ;
46
46
47
47
/// Consume the [`Kernel`] and return the underlying [`CallManager`].
48
- fn take ( self ) -> Self :: CallManager
48
+ fn into_call_manager ( self ) -> Self :: CallManager
49
49
where
50
50
Self : Sized ;
51
51
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ mod test {
113
113
let mut bs = MemoryBlockstore :: default ( ) ;
114
114
let mut st = StateTree :: new ( bs, StateTreeVersion :: V4 ) . unwrap ( ) ;
115
115
let root = st. flush ( ) . unwrap ( ) ;
116
- bs = st. consume ( ) ;
116
+ bs = st. into_store ( ) ;
117
117
118
118
// An empty built-in actors manifest.
119
119
let manifest_cid = {
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ impl<M: Machine> Machine for Box<M> {
64
64
}
65
65
66
66
#[ inline( always) ]
67
- fn consume ( self ) -> Self :: Blockstore {
68
- ( * self ) . consume ( )
67
+ fn into_store ( self ) -> Self :: Blockstore {
68
+ ( * self ) . into_store ( )
69
69
}
70
70
71
71
#[ inline( always) ]
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ where
287
287
Ok ( ( ) )
288
288
}
289
289
290
- fn consume ( self ) -> Self :: Blockstore {
291
- self . state_tree . consume ( )
290
+ fn into_store ( self ) -> Self :: Blockstore {
291
+ self . state_tree . into_store ( )
292
292
}
293
293
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ pub trait Machine: 'static {
85
85
}
86
86
87
87
/// Consumes the machine and returns the owned blockstore.
88
- fn consume ( self ) -> Self :: Blockstore ;
88
+ fn into_store ( self ) -> Self :: Blockstore ;
89
89
}
90
90
91
91
/// Execution context supplied to the machine.
Original file line number Diff line number Diff line change @@ -496,8 +496,8 @@ where
496
496
}
497
497
498
498
/// Consumes this StateTree and returns the Blockstore it owns via the HAMT.
499
- pub fn consume ( self ) -> S {
500
- self . hamt . consume ( )
499
+ pub fn into_store ( self ) -> S {
500
+ self . hamt . into_store ( )
501
501
}
502
502
503
503
pub fn for_each < F > ( & self , mut f : F ) -> anyhow:: Result < ( ) >
You can’t perform that action at this time.
0 commit comments