mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 01:33:30 +02:00
strings4: remove From-based conversion
To understand From-based conversion, an understanding of traits is required, which we teach in a later chapter. The From trait specifically is taught in one of the conversion exercises. So, we can safely remove it here without users missing out on learning something important. A specific source of confusion for users was a warning that the conversion is useless, which appeared when using the `string_slice` function for the expression with `.into()`. closes #2190
This commit is contained in:
@@ -21,8 +21,6 @@ fn main() {
|
||||
|
||||
placeholder("rust is fun!".to_owned());
|
||||
|
||||
placeholder("nice weather".into());
|
||||
|
||||
placeholder(format!("Interpolation {}", "Station"));
|
||||
|
||||
// WARNING: This is byte indexing, not character indexing.
|
||||
|
||||
Reference in New Issue
Block a user