Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Let Sponge::start take io-pattern as impl Into<Vec<Call>> #4

Closed
moCello opened this issue Mar 7, 2024 · 1 comment · Fixed by #5
Closed

Let Sponge::start take io-pattern as impl Into<Vec<Call>> #4

moCello opened this issue Mar 7, 2024 · 1 comment · Fixed by #5

Comments

@moCello
Copy link
Member

moCello commented Mar 7, 2024

Summary

Currently the io-pattern needs to be passed to Sponge::start as a Vec<Call> but it would be much more convenient to have it take any type that is impl AsRef<[Call]>.

@moCello
Copy link
Member Author

moCello commented Mar 8, 2024

With the above Sponge would need to carry a the io-pattern as a reference to slice of Call but I would prefer to have the Sponge own the io-pattern.

Solution is to give io-pattern as impl Into<Vec<Call>> as this gives the Sponge struct ownership of the io-pattern while being as unrestrictive as possible.

@moCello moCello changed the title Let Sponge::start take io-pattern as impl AsRef<[Call]> Let Sponge::start take io-pattern as impl Into<Vec<Call>> Mar 8, 2024
moCello added a commit that referenced this issue Mar 8, 2024
@moCello moCello closed this as completed in #5 Mar 8, 2024
This was referenced Mar 14, 2024
@moCello moCello mentioned this issue Mar 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant