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.
4141
4242{{#include exercise.rs:main}}
4343```
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 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- #![ allow( dead_code) ]
16-
1715// ANCHOR: solution
1816// ANCHOR: event
17+ #![ allow( dead_code) ]
18+
1919#[ derive( Debug ) ]
2020/// An event in the elevator system that the controller must react to.
2121enum Event {
You can’t perform that action at this time.
0 commit comments