@@ -81,14 +81,14 @@ pub(crate) enum FileBuffer {
8181impl FileBuffer {
8282 /// All the buffers space to be re-used when the last reference to it is dropped.
8383 pub ( crate ) fn clear ( & mut self ) {
84- if let FileBuffer :: Threaded ( ref mut contents) = self {
84+ if let FileBuffer :: Threaded ( contents) = self {
8585 contents. clear ( )
8686 }
8787 }
8888
8989 pub ( crate ) fn len ( & self ) -> usize {
9090 match self {
91- FileBuffer :: Immediate ( ref vec) => vec. len ( ) ,
91+ FileBuffer :: Immediate ( vec) => vec. len ( ) ,
9292 FileBuffer :: Threaded ( PoolReference :: Owned ( owned, _) ) => owned. len ( ) ,
9393 FileBuffer :: Threaded ( PoolReference :: Mut ( mutable, _) ) => mutable. len ( ) ,
9494 }
@@ -109,7 +109,7 @@ impl Deref for FileBuffer {
109109
110110 fn deref ( & self ) -> & Self :: Target {
111111 match self {
112- FileBuffer :: Immediate ( ref vec) => vec,
112+ FileBuffer :: Immediate ( vec) => vec,
113113 FileBuffer :: Threaded ( PoolReference :: Owned ( owned, _) ) => owned,
114114 FileBuffer :: Threaded ( PoolReference :: Mut ( mutable, _) ) => mutable,
115115 }
@@ -119,7 +119,7 @@ impl Deref for FileBuffer {
119119impl DerefMut for FileBuffer {
120120 fn deref_mut ( & mut self ) -> & mut Self :: Target {
121121 match self {
122- FileBuffer :: Immediate ( ref mut vec) => vec,
122+ FileBuffer :: Immediate ( vec) => vec,
123123 FileBuffer :: Threaded ( PoolReference :: Owned ( _, _) ) => {
124124 unimplemented ! ( )
125125 }
@@ -337,15 +337,11 @@ pub(crate) fn perform<F: Fn(usize)>(item: &mut Item, chunk_complete_callback: F)
337337 // Files, write them.
338338 item. result = match & mut item. kind {
339339 Kind :: Directory => create_dir ( & item. full_path ) ,
340- Kind :: File ( ref mut contents) => {
340+ Kind :: File ( contents) => {
341341 contents. clear ( ) ;
342342 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 ) ,
349345 }
350346 }
351347 Kind :: IncrementalFile ( incremental_file) => write_file_incremental (
0 commit comments