Skip to content

Commit 39142b8

Browse files
committed
style: clippy lints for rustc 1.84.0
1 parent 150bc25 commit 39142b8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/table_collection.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,7 @@ impl TableCollection {
147147
/// A panic will occur if the system runs out of memory.
148148
pub fn new_from_file(filename: impl AsRef<str>) -> Result<Self, TskitError> {
149149
// Arbitrary sequence_length.
150-
let mut tables = match TableCollection::new(1.0) {
151-
Ok(t) => t,
152-
Err(e) => return Err(e),
153-
};
150+
let mut tables = TableCollection::new(1.0)?;
154151

155152
let c_str = std::ffi::CString::new(filename.as_ref()).map_err(|_| {
156153
TskitError::LibraryError("call to ffi::CString::new failed".to_string())

0 commit comments

Comments
 (0)