Skip to content

Remove std.mem.toSliceConst, have toSlice return the const-ness of its argument #3985

@daurnimator

Description

@daurnimator

@daurnimator

It might make sense to remove toSliceConst entirely and have the return value have the const-ness of the argument?

@andrewrk

I agree with this. I would even go so far as to say it's worth having the parameter accept a var type in general to accommodate this.

Originally posted in #3972

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions