Comments (3)
I've noticed this as well (didn't report it because I wasn't sure that accessing uninitialised bytes falls under rust's definition of "unsafe") about MutBuf::bytes
. I don't understand how Buf::bytes
is unsafe though. How can you access uninitialised memory through it (without abusing MutBuf
's advance
)?
from bytes.
I believe you are correct re: Buf::bytes()
. I just made this issue as a reminder without thinking too much about it. I should probably tackle this soon though.
from bytes.
This was done.
from bytes.
Related Issues (20)
- Please allow to construct BytesMut with custom alignment HOT 1
- Know ahead of time whether `.reserve` will reallocate
- Missing way to create Bytes from a slice of Bytes HOT 3
- Align BytesMut to page boundary (4096 bytes) HOT 2
- Add protobuf-style variable-length serialization / deserialization HOT 4
- An arithmetic overflow bug found by afl.rs HOT 2
- make Bytes repr(C)? HOT 2
- Bytes::make_mut HOT 8
- Unnecessary `Sized` constraint on `BufMut::put` method? HOT 1
- Why not impl `Buf::get_array<const N: usize>(&mut self) -> [u8; N]`? HOT 3
- Export `BytesMut::from_vec(vec)` HOT 3
- Integer Overflow Panic Bug in Library
- Unable to try_reclaim(..) a BytesMut allocation HOT 1
- There is no Bytes::advance HOT 2
- Why is the `data` pointer atomic? HOT 2
- Add support for Nom HOT 4
- bytes::BytesMut::extend_from_slice or mio::net::TcpSocket produces unexpected result HOT 1
- New release?
- Fix some spelling mistakes
- docs: unclear how to free memory from a bytesmut HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bytes.