Switch a use of unchecked
to unsafe
.
This commit is contained in:
parent
fbf362809b
commit
d26e2a9ce6
1 changed files with 1 additions and 1 deletions
|
@ -1001,7 +1001,7 @@ pure fn pure_length<T>(ls: List<T>) -> uint {
|
|||
Despite its name, `pure_foldl` is a `fn`, not a `pure fn`, because there is no
|
||||
way in Rust to specify that the higher-order function argument `f` is a pure
|
||||
function. So, to use `foldl` in a pure list length function that a pure function
|
||||
could then use, we must use an `unchecked` block wrapped around the call to
|
||||
could then use, we must use an `unsafe` block wrapped around the call to
|
||||
`pure_foldl` in the definition of `pure_length`.
|
||||
|
||||
#### Generic functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue