]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/rust-by-example/src/custom_types/structs.md
New upstream version 1.53.0+dfsg1
[rustc.git] / src / doc / rust-by-example / src / custom_types / structs.md
index 0dfc26129266d035343c679829e26356f1b202cb..227a261fb5d8506c7ecefae78f51cb4984dc4f2e 100644 (file)
@@ -3,8 +3,7 @@
 There are three types of structures ("structs") that can be created using the
 `struct` keyword:
 
-* Tuple structs, which are, basically, named tuples.
-* The classic [C structs][c_struct]
+* Tuple structs, which are, basically, named tuples. The classic [C structs][c_struct]
 * Unit structs, which are field-less, are useful for generics.
 
 ```rust,editable
@@ -86,7 +85,7 @@ fn main() {
 
 ### Activity
 
-1. Add a function `rect_area` which calculates the area of a rectangle (try
+1. Add a function `rect_area` which calculates the area of a `Rectangle` (try
    using nested destructuring).
 2. Add a function `square` which takes a `Point` and a `f32` as arguments, and
    returns a `Rectangle` with its lower left corner on the point, and a width and