Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Courses
Rust
Program flow and memory safety
Merge requests
!5
slides for vector
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Andrea Piseri
requested to merge
vectors
into
2023_edition
1 year ago
Overview
25
Commits
11
Pipelines
11
Changes
1
0
0
Viewing commit
8cc36c4f
Prev
Next
Show latest version
1 file
+
2
−
2
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
8cc36c4f
rectify styling
· 8cc36c4f
Andrea Piseri
authored
1 year ago
slides/4-vectors.html
+
2
−
2
Options
View file @ 8cc36c4f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -32,7 +32,7 @@
<li>
Is a
<b>
statically sized
</b>
collection
</li>
<div
class=
"fragment"
><li>
Can be indexed through the
<code>
[]
</code>
operator
</li></div>
<div
class=
"fragment"
><li>
Is a
<b>
value type
</b>
, expensive to copy if big!
</li></div>
<div
class=
"fragment"
><li>
Has the lowest
<b>
overhead
</b>
, bound checks can be optimized out
</li></div>
<div
class=
"fragment"
><li>
Has the
<b>
lowest overhead
</b>
, bound checks can be optimized out
</li></div>
</ul>
</section>
@@ -148,7 +148,7 @@
<section
data-auto-animate
>
<x-section-title>
Vectors
</x-section-title>
<h2>
Finally, vectors!
</h2>
<img
src=
"resources/vector_type_anatomy.
pn
g"
height=
35%
>
<img
src=
"resources/vector_type_anatomy.
sv
g"
height=
35%
>
<p>
A vector:
<ul>
<li>
Can
<b>
dynamically
</b>
resize itself to accomodate new elements
</li>
Menu
Explore
Projects
Groups
Topics
Snippets