File tree 1 file changed +2
-6
lines changed
src/vmm/src/devices/virtio
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,8 @@ impl IoVecBuffer {
97
97
///
98
98
/// The descriptor chain cannot be referencing the same memory location as another chain
99
99
pub unsafe fn from_descriptor_chain ( head : DescriptorChain ) -> Result < Self , IoVecError > {
100
- let mut new_buffer: Self = Default :: default ( ) ;
101
-
100
+ let mut new_buffer = Self :: default ( ) ;
102
101
new_buffer. load_descriptor_chain ( head) ?;
103
-
104
102
Ok ( new_buffer)
105
103
}
106
104
@@ -275,10 +273,8 @@ impl IoVecBufferMut {
275
273
///
276
274
/// The descriptor chain cannot be referencing the same memory location as another chain
277
275
pub unsafe fn from_descriptor_chain ( head : DescriptorChain ) -> Result < Self , IoVecError > {
278
- let mut new_buffer: Self = Default :: default ( ) ;
279
-
276
+ let mut new_buffer = Self :: default ( ) ;
280
277
new_buffer. load_descriptor_chain ( head) ?;
281
-
282
278
Ok ( new_buffer)
283
279
}
284
280
You can’t perform that action at this time.
0 commit comments