@@ -81,14 +81,14 @@ pub(crate) enum FileBuffer {
81
81
impl FileBuffer {
82
82
/// All the buffers space to be re-used when the last reference to it is dropped.
83
83
pub ( crate ) fn clear ( & mut self ) {
84
- if let FileBuffer :: Threaded ( ref mut contents) = self {
84
+ if let FileBuffer :: Threaded ( contents) = self {
85
85
contents. clear ( )
86
86
}
87
87
}
88
88
89
89
pub ( crate ) fn len ( & self ) -> usize {
90
90
match self {
91
- FileBuffer :: Immediate ( ref vec) => vec. len ( ) ,
91
+ FileBuffer :: Immediate ( vec) => vec. len ( ) ,
92
92
FileBuffer :: Threaded ( PoolReference :: Owned ( owned, _) ) => owned. len ( ) ,
93
93
FileBuffer :: Threaded ( PoolReference :: Mut ( mutable, _) ) => mutable. len ( ) ,
94
94
}
@@ -109,7 +109,7 @@ impl Deref for FileBuffer {
109
109
110
110
fn deref ( & self ) -> & Self :: Target {
111
111
match self {
112
- FileBuffer :: Immediate ( ref vec) => vec,
112
+ FileBuffer :: Immediate ( vec) => vec,
113
113
FileBuffer :: Threaded ( PoolReference :: Owned ( owned, _) ) => owned,
114
114
FileBuffer :: Threaded ( PoolReference :: Mut ( mutable, _) ) => mutable,
115
115
}
@@ -119,7 +119,7 @@ impl Deref for FileBuffer {
119
119
impl DerefMut for FileBuffer {
120
120
fn deref_mut ( & mut self ) -> & mut Self :: Target {
121
121
match self {
122
- FileBuffer :: Immediate ( ref mut vec) => vec,
122
+ FileBuffer :: Immediate ( vec) => vec,
123
123
FileBuffer :: Threaded ( PoolReference :: Owned ( _, _) ) => {
124
124
unimplemented ! ( )
125
125
}
@@ -337,15 +337,11 @@ pub(crate) fn perform<F: Fn(usize)>(item: &mut Item, chunk_complete_callback: F)
337
337
// Files, write them.
338
338
item. result = match & mut item. kind {
339
339
Kind :: Directory => create_dir ( & item. full_path ) ,
340
- Kind :: File ( ref mut contents) => {
340
+ Kind :: File ( contents) => {
341
341
contents. clear ( ) ;
342
342
match contents {
343
- FileBuffer :: Immediate ( ref contents) => {
344
- write_file ( & item. full_path , contents, item. mode )
345
- }
346
- FileBuffer :: Threaded ( ref mut contents) => {
347
- write_file ( & item. full_path , contents, item. mode )
348
- }
343
+ FileBuffer :: Immediate ( contents) => write_file ( & item. full_path , contents, item. mode ) ,
344
+ FileBuffer :: Threaded ( contents) => write_file ( & item. full_path , contents, item. mode ) ,
349
345
}
350
346
}
351
347
Kind :: IncrementalFile ( incremental_file) => write_file_incremental (
0 commit comments