Comments (3)
The std docs for Vec
say:
Most fundamentally, Vec is and always will be a (pointer, capacity, length) triplet. No more, no less. The order of these fields is completely unspecified [...]
However, they also give this specific example (pointer, capacity, length)
for illustrative purposes; and I think we are no different in that respect.
That said, I can understand that the disclaimer we have is 1-2 pages away and it might be misleading for some people that jump into that section without reading the context; maybe repeating that hint might be warranted.
from cheats.rs.
Maybe I misunderstand, but we already have a disclaimer that you are not allowed to transmute
unless you have representation guarantees which I think Vec
doesn't give, neither for it being repr(C)
, nor for these fields to be in a particular order if it were.
So from that perspective all depictions are merely illustrative anyways, and the point is to depict what's contained, not where exactly that resides.
from cheats.rs.
What I means is that in Memory Layout > Standard Library Types chapter, the Vec<T>
is drawn with a specific order. Is this appropriate (need not change) or to be changed?
Or maybe adding some comments will be better?
from cheats.rs.
Related Issues (20)
- Syntax Highlighting not longer working on the LightMode version of the page HOT 3
- What does this symbol mean (Feedback 2022-06)
- Translate into other languages HOT 1
- "Legal" page messed up again ...
- PDF looks ugly again
- Site Outage HOT 1
- Visually depict MaybeUninit?
- Unexplained acronym "s.f." HOT 1
- "Implementing Families — impl<>" compilation error HOT 2
- possible duplicate word in "this creates a relation relation of types named `Complex`" HOT 1
- `json` or `text` output endpoint to allow for cli usage HOT 1
- Issues with the PDF HOT 4
- Blurred font in Safari HOT 9
- error: the `?` macro repetition operator does not take a separator HOT 1
- typo: duplicated word HOT 1
- `fn f() where Self: R {} Other R useful w. dflt. fn. (non dflt. would need be impl'ed anyway).` HOT 2
- Date stamp is wrong ? HOT 1
- `b"..."` literals are sized
- Doubt in Memories & Lifetimes, subsection of References and Pointers HOT 3
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 cheats.rs.