File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ impl<'b> Copy for Label<'b> {}
31
31
/// string is copied, not the string itself.
32
32
impl < ' b > Clone for Label < ' b > {
33
33
fn clone ( & self ) -> Self {
34
- Label ( self . 0 )
34
+ * self
35
35
}
36
36
}
37
37
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl Command {
96
96
97
97
fn read_file ( file : & Path ) -> Result < Vec < u8 > , Err > {
98
98
let mut buf = Vec :: with_capacity ( 1024 ) ;
99
- let bytes = File :: open ( & file) ?. read_to_end ( & mut buf) ?;
99
+ let bytes = File :: open ( file) ?. read_to_end ( & mut buf) ?;
100
100
info ! ( "Read {} bytes from {}" , bytes, file. display( ) ) ;
101
101
Ok ( buf)
102
102
}
@@ -113,7 +113,7 @@ fn ensure_available_outfile(out: &Path) -> Result<(), Err> {
113
113
}
114
114
115
115
fn create_outfile ( out : & Path ) -> Result < BufWriter < File > , Err > {
116
- let output = File :: create ( & out) ?;
116
+ let output = File :: create ( out) ?;
117
117
let writer = BufWriter :: new ( output) ;
118
118
info ! ( "Writing to file {}" , out. display( ) ) ;
119
119
Ok ( writer)
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use crate::Byte;
13
13
/// * `buf` - The input buffer.
14
14
///
15
15
/// * `pred` - A predicate that should return `true` as long as
16
- /// `read_while` should continue to consume input.
16
+ /// `read_while` should continue to consume input.
17
17
pub fn read_while < P > ( buf : Buf , pred : P ) -> ( Buf , Buf )
18
18
where
19
19
P : Fn ( Byte ) -> bool ,
@@ -70,7 +70,7 @@ pub fn read_until_ws(buf: Buf) -> (Buf, Buf) {
70
70
/// * `buf` - The input buffer.
71
71
///
72
72
/// * `pred` - A predicate that should return `true` if `read_char`
73
- /// should consume the byte.
73
+ /// should consume the byte.
74
74
pub fn read_one < P > ( buf : Buf , pred : P ) -> Option < ( Byte , Buf ) >
75
75
where
76
76
P : Fn ( Byte ) -> bool ,
You can’t perform that action at this time.
0 commit comments