-
Notifications
You must be signed in to change notification settings - Fork 66
0.7.0-rc.2 issue: "invalid utf-8 sequence of 1 bytes from index 34" #150
New issue
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
Comments
async fn read_chunk(&mut self, chunk_size: usize, buf: &mut BytesMut) -> Result<()> {
let pos = buf.len();
buf.resize(pos + chunk_size, 0);
self.stream.read_exact(&mut buf[pos..]).await?;
return Ok(());
// This is an unsafe variant of doing the following
// but skips the zero-initialization of the buffer
//
// let pos = bytes.len();
// bytes.resize(pos + chunk_size, 0);
// self.stream.read_exact(&mut bytes[pos..]).await?;
//
// Alternatively, this an unsafe variant of the following except
// it does read extactly `chunk_size` bytes and not maybe more
//
// bytes.reserve(chunk_size);
// self.stream.read_buf(&mut bytes).await?; Seems the unsafe version of this code is breaking something, doing this (as the comment suggested is safe) works fine |
elimirks
added a commit
to elimirks/neo4rs
that referenced
this issue
Nov 23, 2023
PR submitted: #151 |
Ive written a couple of tests returning several thousand elements in an array result, and also returning map, this seems to fix all of the problems experienced in #149 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version:
0.7.0-rc.2
I'm getting this error for a cypher query returning a lot of rows:
Seems to stem from line 81 in
stream.rs
.The text was updated successfully, but these errors were encountered: