File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2222 I : IntoIterator < Item = M :: Symbol > ,
2323{
2424 let mut bitwriter = BitWriter :: endian ( Vec :: new ( ) , BigEndian ) ;
25- let mut encoder = Encoder :: new ( model, & mut bitwriter) ;
25+ let encoder = Encoder :: new ( model, & mut bitwriter) ;
2626
2727 encoder. encode_all ( input) . unwrap ( ) ;
2828 bitwriter. byte_align ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 2626 I : IntoIterator < Item = M :: Symbol > ,
2727{
2828 let mut bitwriter = BitWriter :: endian ( Vec :: new ( ) , BigEndian ) ;
29- let mut encoder = Encoder :: new ( model, & mut bitwriter) ;
29+ let encoder = Encoder :: new ( model, & mut bitwriter) ;
3030
3131 encoder. encode_all ( input) . unwrap ( ) ;
3232 bitwriter. byte_align ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 9292 /// This method can fail if the underlying [`BitWrite`] cannot be written
9393 /// to.
9494 pub fn encode_all (
95- & mut self ,
95+ mut self ,
9696 symbols : impl IntoIterator < Item = M :: Symbol > ,
9797 ) -> Result < ( ) , Error < M :: ValueError > > {
9898 for symbol in symbols {
@@ -138,7 +138,7 @@ where
138138 ///
139139 /// This method can fail if the underlying [`BitWrite`] cannot be written
140140 /// to.
141- pub fn flush ( & mut self ) -> io:: Result < ( ) > {
141+ pub fn flush ( self ) -> io:: Result < ( ) > {
142142 self . state . flush ( )
143143 }
144144
@@ -236,7 +236,7 @@ where
236236 /// # Errors
237237 ///
238238 /// This method can fail if the output cannot be written to
239- pub fn flush ( & mut self ) -> io:: Result < ( ) > {
239+ pub fn flush ( mut self ) -> io:: Result < ( ) > {
240240 self . pending += 1 ;
241241 if self . state . low <= self . state . quarter ( ) {
242242 self . emit ( false ) ?;
Original file line number Diff line number Diff line change 1717 M : Model ,
1818{
1919 let mut bitwriter = BitWriter :: endian ( Vec :: new ( ) , BigEndian ) ;
20- let mut encoder = Encoder :: new ( model, & mut bitwriter) ;
20+ let encoder = Encoder :: new ( model, & mut bitwriter) ;
2121
2222 encoder. encode_all ( input) . unwrap ( ) ;
2323 bitwriter. byte_align ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments