Skip to content

Commit 54525b5

Browse files
committed
Fix lints
1 parent 7b4a494 commit 54525b5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/hack/label.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'b> Copy for Label<'b> {}
3131
/// string is copied, not the string itself.
3232
impl<'b> Clone for Label<'b> {
3333
fn clone(&self) -> Self {
34-
Label(self.0)
34+
*self
3535
}
3636
}
3737

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Command {
9696

9797
fn read_file(file: &Path) -> Result<Vec<u8>, Err> {
9898
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)?;
100100
info!("Read {} bytes from {}", bytes, file.display());
101101
Ok(buf)
102102
}
@@ -113,7 +113,7 @@ fn ensure_available_outfile(out: &Path) -> Result<(), Err> {
113113
}
114114

115115
fn create_outfile(out: &Path) -> Result<BufWriter<File>, Err> {
116-
let output = File::create(&out)?;
116+
let output = File::create(out)?;
117117
let writer = BufWriter::new(output);
118118
info!("Writing to file {}", out.display());
119119
Ok(writer)

src/utils/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::Byte;
1313
/// * `buf` - The input buffer.
1414
///
1515
/// * `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.
1717
pub fn read_while<P>(buf: Buf, pred: P) -> (Buf, Buf)
1818
where
1919
P: Fn(Byte) -> bool,
@@ -70,7 +70,7 @@ pub fn read_until_ws(buf: Buf) -> (Buf, Buf) {
7070
/// * `buf` - The input buffer.
7171
///
7272
/// * `pred` - A predicate that should return `true` if `read_char`
73-
/// should consume the byte.
73+
/// should consume the byte.
7474
pub fn read_one<P>(buf: Buf, pred: P) -> Option<(Byte, Buf)>
7575
where
7676
P: Fn(Byte) -> bool,

0 commit comments

Comments
 (0)