Skip to content

Commit cf38f03

Browse files
committed
Auto merge of #238 - ageorgou:functions4-update, r=fmoko
Update line numbers in hints and outdated comment In functions4, the missing code is in line 14 in the latest version: ```rust error: expected type, found `{` --> exercises/functions/functions4.rs:14:30 | 14 | fn sale_price(price: i32) -> { | ^ expected type error: aborting due to previous error ``` but the hint points to line 12. This is due to a recent change in 2cdd612. Also includes similar updates for strings2 and primitive_types4.
2 parents 57a837b + 4c5189d commit cf38f03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

info.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ name = "functions4"
9090
path = "exercises/functions/functions4.rs"
9191
mode = "compile"
9292
hint = """
93-
The error message points to line 12 and says it expects a type after the
93+
The error message points to line 14 and says it expects a type after the
9494
`->`. This is where the function's return type should be-- take a look at
9595
the `is_even` function for an example!"""
9696

@@ -152,8 +152,8 @@ https://doc.rust-lang.org/book/ch04-03-slices.html
152152
and use the starting and ending indices of the items in the Array
153153
that you want to end up in the slice.
154154
155-
If you're curious why the right hand of the `==` comparison does not
156-
have an ampersand for a reference since the left hand side is a
155+
If you're curious why the first argument of `assert_eq!` does not
156+
have an ampersand for a reference since the second argument is a
157157
reference, take a look at the Deref coercions section of the book:
158158
https://doc.rust-lang.org/book/ch15-02-deref.html"""
159159

@@ -214,7 +214,7 @@ mode = "compile"
214214
hint = """
215215
Yes, it would be really easy to fix this by just changing the value bound to `word` to be a
216216
string slice instead of a `String`, wouldn't it?? There is a way to add one character to line
217-
6, though, that will coerce the `String` into a string slice."""
217+
9, though, that will coerce the `String` into a string slice."""
218218

219219
# TEST 2
220220

0 commit comments

Comments
 (0)