Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

List::from_parts could drop thedepth parameter #46

Open
@michaelsproul

Description

@michaelsproul

PresentlyList::from_parts doesn't check that thedepth passed in is correct. It is apub(crate) function and is only intended for internal use where the depth has already been checked. Even so, we could make the API more correct by construction by omitting thedepth parameter and deriving it fromSelf::depth, or by checking the depth and returning an error if it is incorrect. I think the first solution is preferable.

I think the parameter was only passed in as an optimisation to avoid computing it twice, but this is likely a very minor saving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp