summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-06-25 19:52:29 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-09-16 12:32:19 +0200
commitf9b51a1ea8ff7ce76bec0573e00857c2401fa400 (patch)
tree85f02591563f592eb68e5498e25298f83cc1bd74
parent415b83f6b19e93a026e8c92250a49fa500b0ccaf (diff)
Impl From<&str> for ImageName if in testing code
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/util/docker.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/docker.rs b/src/util/docker.rs
index 33fc9eb..3a799bf 100644
--- a/src/util/docker.rs
+++ b/src/util/docker.rs
@@ -32,6 +32,13 @@ impl From<String> for ImageName {
}
}
+#[cfg(test)]
+impl From<&str> for ImageName {
+ fn from(s: &str) -> Self {
+ ImageName(String::from(s))
+ }
+}
+
impl AsRef<str> for ImageName {
fn as_ref(&self) -> &str {
self.0.as_ref()