Merge pull request #565 from jonathandturner/fix_open_panic

Fix unwrap in open
This commit is contained in:
Jonathan Turner 2019-09-02 12:30:09 +12:00 committed by GitHub
commit 90f190e54a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,10 +63,13 @@ fn run(
let stream = async_stream_block! {
//FIXME: unwraps
let result = fetch(&full_path, &path_str, path_span).await;
let (file_extension, contents, contents_tag, span_source) =
fetch(&full_path, &path_str, path_span).await.unwrap();
if let Err(e) = result {
yield Err(e);
return;
}
let (file_extension, contents, contents_tag, span_source) = result.unwrap();
let file_extension = if has_raw {
None