We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 150bc25 commit 7fe8dc7Copy full SHA for 7fe8dc7
src/table_collection.rs
@@ -147,10 +147,7 @@ impl TableCollection {
147
/// A panic will occur if the system runs out of memory.
148
pub fn new_from_file(filename: impl AsRef<str>) -> Result<Self, TskitError> {
149
// Arbitrary sequence_length.
150
- let mut tables = match TableCollection::new(1.0) {
151
- Ok(t) => t,
152
- Err(e) => return Err(e),
153
- };
+ let mut tables = TableCollection::new(1.0)?;
154
155
let c_str = std::ffi::CString::new(filename.as_ref()).map_err(|_| {
156
TskitError::LibraryError("call to ffi::CString::new failed".to_string())
0 commit comments