File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,13 @@ out of these structures.
41
41
42
42
{{#include exercise.rs:main}}
43
43
```
44
+
45
+ <details >
46
+
47
+ - If students ask about ` #![allow(dead_code)] ` at the top of the exercise, it's
48
+ necessary because the only thing we do with the ` Event ` type is print it out.
49
+ Due to a nuance of how the compiler checks for dead code this causes it to
50
+ think that the code is unused. They can ignore it for the purpose of this
51
+ exercise.
52
+
53
+ </details >
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- #![ allow( dead_code) ]
16
-
17
15
// ANCHOR: solution
18
16
// ANCHOR: event
17
+ #![ allow( dead_code) ]
18
+
19
19
#[ derive( Debug ) ]
20
20
/// An event in the elevator system that the controller must react to.
21
21
enum Event {
You can’t perform that action at this time.
0 commit comments