Skip to content

Commit

Permalink
fix!: drop Clone impl for ContainerRequest (#680)
Browse files Browse the repository at this point in the history
`Image` can be cloned just fine, but `ContainerRequest` is not intended
to be, and is not, a truly safe structure for cloning. It allows to
override unique container properties: container name, port mappings and
log consumers (soon).

If necessary, you can always use a reusable constructor/method to create
multiple similar `ContainerRequests`.
  • Loading branch information
DDtKey authored Jul 6, 2024
1 parent 8a32b5c commit ae52151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcontainers/src/core/containers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{

/// Represents a request to start a container, allowing customization of the container.
#[must_use]
#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct ContainerRequest<I: Image> {
pub(crate) image: I,
pub(crate) overridden_cmd: Vec<String>,
Expand Down

0 comments on commit ae52151

Please sign in to comment.