Skip to content

Remove Container lifetime #534

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ufoscout
Copy link
Contributor

The lifetime on the Container struct is useless because the container owns the Cli, so Rust guarantees that the client cannot be dropped while the container is in scope.
This makes also the Container Send and Sync which can be useful in some complex test scenarios

@thomaseizinger
Copy link
Collaborator

I agree that this lifetime should go away. The discussion around that is in #386.

I don't want to just remove it without the requirements around creation and removal of networks being properly addressed.

@DDtKey
Copy link
Collaborator

DDtKey commented Apr 6, 2024

This PR hides the fact of dependency between Client and Container.
Any networks created for container are being removed only on drop of client.

I also agree that we need to rework this, but not this way.

I'm going to close the PR, because another reason is that we going to deprecate Cli client and probably re-work HTTP one.

Don't hesitate to continue discussion in the related issue. We will figure out optimal way to make it reliable.
Thank you!

@DDtKey DDtKey closed this Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants