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 22
22
I : IntoIterator < Item = M :: Symbol > ,
23
23
{
24
24
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) ;
26
26
27
27
encoder. encode_all ( input) . unwrap ( ) ;
28
28
bitwriter. byte_align ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 26
26
I : IntoIterator < Item = M :: Symbol > ,
27
27
{
28
28
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) ;
30
30
31
31
encoder. encode_all ( input) . unwrap ( ) ;
32
32
bitwriter. byte_align ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 92
92
/// This method can fail if the underlying [`BitWrite`] cannot be written
93
93
/// to.
94
94
pub fn encode_all (
95
- & mut self ,
95
+ mut self ,
96
96
symbols : impl IntoIterator < Item = M :: Symbol > ,
97
97
) -> Result < ( ) , Error < M :: ValueError > > {
98
98
for symbol in symbols {
@@ -138,7 +138,7 @@ where
138
138
///
139
139
/// This method can fail if the underlying [`BitWrite`] cannot be written
140
140
/// to.
141
- pub fn flush ( & mut self ) -> io:: Result < ( ) > {
141
+ pub fn flush ( self ) -> io:: Result < ( ) > {
142
142
self . state . flush ( )
143
143
}
144
144
@@ -236,7 +236,7 @@ where
236
236
/// # Errors
237
237
///
238
238
/// 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 < ( ) > {
240
240
self . pending += 1 ;
241
241
if self . state . low <= self . state . quarter ( ) {
242
242
self . emit ( false ) ?;
Original file line number Diff line number Diff line change 17
17
M : Model ,
18
18
{
19
19
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) ;
21
21
22
22
encoder. encode_all ( input) . unwrap ( ) ;
23
23
bitwriter. byte_align ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments