Skip to content

Commit

Permalink
Unwrap the JoinHandle's result so we can match on its contents.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinetiknz committed Jan 26, 2016
1 parent ec007a4 commit b6d5621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/capi.rs
Expand Up @@ -124,7 +124,7 @@ pub unsafe extern "C" fn mp4parse_read(context: *mut MediaContext, buffer: *cons
// result in an Ok(..) otherwise, meaning we could see
// Ok(Err(Error::..)) here. So map thread failures back
// to an mp4parse::Error before converting to a C return value.
match task.join().or(Err(Error::AssertCaught)) {
match task.join().unwrap_or(Err(Error::AssertCaught)) {
Ok(_) => MP4PARSE_OK,
Err(Error::InvalidData) => MP4PARSE_ERROR_INVALID,
Err(Error::Unsupported) => MP4PARSE_ERROR_UNSUPPORTED,
Expand Down

0 comments on commit b6d5621

Please sign in to comment.