Convert open/fetch to stream (#2028)

* Types lined up for open with stream

* Chunking stream

* Maybe I didn't need most of the Stream stuff after all?

* Some clean-up

* Merge weird cargo.lock

* Start moving some encoding logic to MaybeTextCodec

Will we lose the nice table formatting if we Stream? How do we get it back? Collect the Stream at the end?

* Clean-up and small refinements

* Put in auto-convert workaround

* Workaround to make sure bat functionality works

* Handle some easy error cases

* All tests pass

* Remove guessing logic

* Address clippy comments

* Pull latest master and fix MaybeTextCodec usage

* Add tag to enable autoview
This commit is contained in:
Arash Outadi
2020-07-03 12:53:20 -07:00
committed by GitHub
parent 8775991c2d
commit e31e8d1550
10 changed files with 609 additions and 407 deletions

View File

@ -224,7 +224,11 @@ fn errors_if_file_not_found() {
cwd: "tests/fixtures/formats",
"open i_dont_exist.txt"
);
//assert!(actual.err.contains("File could not be opened"));
assert!(actual.err.contains("Cannot open"));
let expected = "Cannot canonicalize";
assert!(
actual.err.contains(expected),
"Error:\n{}\ndoes not contain{}",
actual.err,
expected
);
}