Conversation
✅ Deploy Preview for testcontainers-rust ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| /// Represents a filesystem mount. | ||
| /// For more information see [Docker Storage](https://docs.docker.com/storage/) documentation. | ||
| #[derive(Debug, Clone)] | ||
| #[derive(Debug, Clone, PartialEq)] |
There was a problem hiding this comment.
That might not work as expected because equality here isn’t just about comparing all fields. For instance, if access, permissions or tmpfs size are different but point to the same target path, should it be considered equal or not? It depends on the use case - but in most of cases you most likely only interested in unique mount per target or (source, target)
There was a problem hiding this comment.
the way I implemented it now works for my use case (I'm using a fork of testconainers as a dependency to my project until this PR is merged).
If someone has a use case where they only care about some fields but not others, then a method can be added for those cases, like Mount::eq_target_path(other: Mount)
fixes #911