Skip to content

Commit f0d71cf

Browse files
authored
chore: make clippy happy (#52)
1 parent 3134cab commit f0d71cf

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

benches/arrow_reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use orc_rust::arrow_reader::ArrowReaderBuilder;
2323

2424
fn basic_path(path: &str) -> String {
2525
let dir = env!("CARGO_MANIFEST_DIR");
26-
format!("{}/tests/basic/data/{}", dir, path)
26+
format!("{dir}/tests/basic/data/{path}")
2727
}
2828

2929
// demo-12-zlib.orc

src/arrow_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ mod tests {
350350
)
351351
.unwrap();
352352

353-
let rows = roundtrip(&[batch.clone()]);
353+
let rows = roundtrip(std::slice::from_ref(&batch));
354354
assert_eq!(batch, rows[0]);
355355
}
356356

src/compression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub enum CompressionType {
9696

9797
impl std::fmt::Display for CompressionType {
9898
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
99-
write!(f, "{:?}", self)
99+
write!(f, "{self:?}")
100100
}
101101
}
102102

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ pub mod arrow_writer;
5353
pub mod async_arrow_reader;
5454
mod column;
5555
pub mod compression;
56+
#[allow(dead_code)]
5657
mod encoding;
5758
pub mod error;
5859
mod memory;
5960
pub mod projection;
61+
#[allow(dead_code)]
6062
mod proto;
6163
pub mod reader;
6264
pub mod schema;

src/schema.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ fn parse_struct_children_from_proto(
133133
ty.subtypes.len() == ty.field_names.len(),
134134
UnexpectedSnafu {
135135
msg: format!(
136-
"Struct type for column index {} must have matching lengths for subtypes and field names lists",
137-
column_index,
136+
"Struct type for column index {column_index} must have matching lengths for subtypes and field names lists"
138137
)
139138
}
140139
);

tests/basic/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn new_arrow_reader_range(path: &str, range: Range<usize>) -> ArrowReader<File>
7777

7878
fn basic_path(path: &str) -> String {
7979
let dir = env!("CARGO_MANIFEST_DIR");
80-
format!("{}/tests/basic/data/{}", dir, path)
80+
format!("{dir}/tests/basic/data/{path}")
8181
}
8282

8383
#[test]
@@ -617,7 +617,7 @@ pub fn decimal128_timestamps_test() {
617617

618618
fn integration_path(path: &str) -> String {
619619
let dir = env!("CARGO_MANIFEST_DIR");
620-
format!("{}/tests/integration/data/{}", dir, path)
620+
format!("{dir}/tests/integration/data/{path}")
621621
}
622622

623623
// TODO: Move this to integration test file. Placed here because it has access to assert_batches_eq.
@@ -661,7 +661,6 @@ pub fn assert_batches_eq(batches: &[RecordBatch], expected_lines: &[&str]) {
661661
let actual_lines: Vec<_> = formatted.trim().lines().collect();
662662
assert_eq!(
663663
&actual_lines, expected_lines,
664-
"\n\nexpected:\n\n{:#?}\nactual:\n\n{:#?}\n\n",
665-
expected_lines, actual_lines
664+
"\n\nexpected:\n\n{expected_lines:#?}\nactual:\n\n{actual_lines:#?}\n\n"
666665
);
667666
}

0 commit comments

Comments
 (0)