- Notifications
You must be signed in to change notification settings - Fork11
Open
Description
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
Labels
No labels