Skip to content

vec::view()'s signature is unsafe #2879

Closed
@bblum

Description

@bblum
pure fn view<T>(v: &[T], start: uint, end: uint) -> &a.[T]

should be either

pure fn view<T>(v: &[T], start: uint, end: uint) -> &[T]

or

pure fn view<T>(v: &a.[T], start: uint, end: uint) -> &a.[T]

(edit: thanks, niko)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions