From af301a2efe7309b3a59df4f236322eb246140402 Mon Sep 17 00:00:00 2001 From: mokou Date: Wed, 3 Aug 2022 17:31:42 +0200 Subject: [PATCH] feat(errors5): add simpler explanation for box dyn --- Cargo.lock | 2 +- exercises/error_handling/errors5.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index df190ad..862a8a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -459,7 +459,7 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "rustlings" -version = "4.8.0" +version = "5.0.0" dependencies = [ "argh", "assert_cmd", diff --git a/exercises/error_handling/errors5.rs b/exercises/error_handling/errors5.rs index 67411c5..2ba8f90 100644 --- a/exercises/error_handling/errors5.rs +++ b/exercises/error_handling/errors5.rs @@ -4,6 +4,8 @@ // This exercise uses some concepts that we won't get to until later in the course, like `Box` and the // `From` trait. It's not important to understand them in detail right now, but you can read ahead if you like. +// For now, think of the `Box` type as an "I want anything that does ???" type, which, given +// Rust's usual standards for runtime safety, should strike you as somewhat lenient! // In short, this particular use case for boxes is for when you want to own a value and you care only that it is a // type which implements a particular trait. To do so, The Box is declared as of type Box where Trait is the trait