We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently Length and TryClone are implemented for Cursor<&'a [u8]> in src/file/reader.rs
Attempting to create a cursor from a Vec...
fn test_cursor_and_file_has_the_same_behaviour() { let mut buf: Vec<u8> = Vec::new(); get_test_file("alltypes_plain.parquet") .read_to_end(&mut buf) .unwrap(); let cursor = Cursor::new(buf.as_slice()); ...
results in:
`buf` does not live long enough borrowed value does not live long enough rustc(E0597) reader.rs(681, 34): borrowed value does not live long enough reader.rs(681, 34): argument requires that `buf` is borrowed for `'static` reader.rs(691, 5): `buf` dropped here while still borrowed
Implementing Length and TryClone for Cursor<Vec> would allow for:
fn test_cursor_and_file_has_the_same_behaviour() { let mut buf: Vec<u8> = Vec::new(); get_test_file("alltypes_plain.parquet") .read_to_end(&mut buf) .unwrap(); let cursor = Cursor::new(buf); let read_from_cursor = SerializedFileReader::new(cursor).unwrap(); ...
Otherwise, buf: Vec must be declared static in order to initialize a SerializedFileReader from a Cursor.
I'm new to rust so perhaps this is the intended behavior, but if not I'm happy to submit a PR for this
Reporter: David Kegley / @dbkegley
Note: This issue was originally created as ARROW-7768. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered:
Chao Sun / @sunchao: Issue resolved by pull request 6376 #6376
Sorry, something went wrong.
No branches or pull requests
Currently Length and TryClone are implemented for Cursor<&'a [u8]> in src/file/reader.rs
Attempting to create a cursor from a Vec...
results in:
Implementing Length and TryClone for Cursor<Vec> would allow for:
Otherwise, buf: Vec must be declared static in order to initialize a SerializedFileReader from a Cursor.
I'm new to rust so perhaps this is the intended behavior, but if not I'm happy to submit a PR for this
Reporter: David Kegley / @dbkegley
PRs and other links:
Note: This issue was originally created as ARROW-7768. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: