mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:54:34 -06:00
rebuild pages at c71825c
This commit is contained in:
@@ -71,9 +71,10 @@
|
||||
<p>A <code>struct</code>, short for "structure", gives us the ability to name and package
|
||||
together multiple related values that make up a meaningful group. If you come
|
||||
from an object-oriented language, a <code>struct</code> is like an object's data
|
||||
attributes. <code>struct</code> and <code>enum</code> (that we talked about in the last chapter) are
|
||||
the building blocks you can use in Rust to create new types in your program's
|
||||
domain in order to take full advantage of Rust's compile-time type checking.</p>
|
||||
attributes. <code>struct</code> and <code>enum</code> (that we will talk about in the next chapter)
|
||||
are the building blocks you can use in Rust to create new types in your
|
||||
program's domain in order to take full advantage of Rust's compile-time type
|
||||
checking.</p>
|
||||
<p>Let’s write a program which calculates the distance between two points.
|
||||
We’ll start off with single variable bindings, and then refactor it to
|
||||
use <code>struct</code>s instead.</p>
|
||||
|
||||
+4
-3
@@ -3029,9 +3029,10 @@ when we talk about vectors in Chapter XX.</p>
|
||||
<p>A <code>struct</code>, short for "structure", gives us the ability to name and package
|
||||
together multiple related values that make up a meaningful group. If you come
|
||||
from an object-oriented language, a <code>struct</code> is like an object's data
|
||||
attributes. <code>struct</code> and <code>enum</code> (that we talked about in the last chapter) are
|
||||
the building blocks you can use in Rust to create new types in your program's
|
||||
domain in order to take full advantage of Rust's compile-time type checking.</p>
|
||||
attributes. <code>struct</code> and <code>enum</code> (that we will talk about in the next chapter)
|
||||
are the building blocks you can use in Rust to create new types in your
|
||||
program's domain in order to take full advantage of Rust's compile-time type
|
||||
checking.</p>
|
||||
<p>Let’s write a program which calculates the distance between two points.
|
||||
We’ll start off with single variable bindings, and then refactor it to
|
||||
use <code>struct</code>s instead.</p>
|
||||
|
||||
Reference in New Issue
Block a user