Skip to content

Commit

Permalink
style: clippy lints for rustc 1.84.0 (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen authored Jan 23, 2025
1 parent 150bc25 commit 7fe8dc7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/table_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ impl TableCollection {
/// A panic will occur if the system runs out of memory.
pub fn new_from_file(filename: impl AsRef<str>) -> Result<Self, TskitError> {
// Arbitrary sequence_length.
let mut tables = match TableCollection::new(1.0) {
Ok(t) => t,
Err(e) => return Err(e),
};
let mut tables = TableCollection::new(1.0)?;

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

0 comments on commit 7fe8dc7

Please sign in to comment.