mirror of
https://github.com/Dhghomon/easy_rust
synced 2024-11-03 15:40:22 +00:00
deploy: cff2b76563
This commit is contained in:
parent
ec785d3fbc
commit
f4cd4a150b
@ -308,7 +308,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
</code></pre></pre>
|
</code></pre></pre>
|
||||||
<p>So it's almost like saying <code>let my_number = { 100 };</code>.</p>
|
<p>So it's almost like saying <code>let my_number = { 100 };</code>.</p>
|
||||||
<p>Also note that <code>my_number</code> is not <code>mut</code>. We didn't give it a value until we gave it 50, so it never changed its value. In the end, the real code for <code>my_number</code> is just let <code>my_number = 100;</code>.</p>
|
<p>Also note that <code>my_number</code> is not <code>mut</code>. We didn't give it a value until we gave it 50, so it never changed its value. In the end, the real code for <code>my_number</code> is just <code>let my_number = 100;</code>.</p>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
@ -1532,7 +1532,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
</code></pre></pre>
|
</code></pre></pre>
|
||||||
<p>So it's almost like saying <code>let my_number = { 100 };</code>.</p>
|
<p>So it's almost like saying <code>let my_number = { 100 };</code>.</p>
|
||||||
<p>Also note that <code>my_number</code> is not <code>mut</code>. We didn't give it a value until we gave it 50, so it never changed its value. In the end, the real code for <code>my_number</code> is just let <code>my_number = 100;</code>.</p>
|
<p>Also note that <code>my_number</code> is not <code>mut</code>. We didn't give it a value until we gave it 50, so it never changed its value. In the end, the real code for <code>my_number</code> is just <code>let my_number = 100;</code>.</p>
|
||||||
<h2 id="collection-types"><a class="header" href="#collection-types">Collection types</a></h2>
|
<h2 id="collection-types"><a class="header" href="#collection-types">Collection types</a></h2>
|
||||||
<p>Rust has a lot of types for making a collection. Collections are for when you need more than one value in one spot. For example, you could have information on all the cities in your country inside one variable. We will start with arrays, which are fastest but also have the least functionality. They are kind of like <code>&str</code> in that way.</p>
|
<p>Rust has a lot of types for making a collection. Collections are for when you need more than one value in one spot. For example, you could have information on all the cities in your country inside one variable. We will start with arrays, which are fastest but also have the least functionality. They are kind of like <code>&str</code> in that way.</p>
|
||||||
<h3 id="arrays"><a class="header" href="#arrays">Arrays</a></h3>
|
<h3 id="arrays"><a class="header" href="#arrays">Arrays</a></h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user