diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 10:21:41 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-06 10:22:01 +0100 |
commit | d9ec48ce13f1e4b296ac551a07b968ccadea8e70 (patch) | |
tree | 46d814912b4fb94cfded8d14f9604ecc8275234c /src/main.rs | |
parent | 8dc44d0c66236ce8a0cf9fc2ea90b53f1d702bfb (diff) |
Let Image::create_or_fetch() take an &ImageName instead of &str
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 803bd5e..27a00dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,12 +127,13 @@ async fn build<'a>(matches: &ArgMatches, use schema::packages; use schema::githashes; use schema::images; + use crate::util::docker::ImageName; let now = chrono::offset::Local::now().naive_local(); let submit_id = uuid::Uuid::new_v4(); info!("Submit {}, started {}", submit_id, now); - let image_name = matches.value_of("image").unwrap(); // safe by clap + let image_name = matches.value_of("image").map(String::from).map(ImageName::from).unwrap(); // safe by clap let hash_str = crate::util::git::get_repo_head_commit_hash(repo_path)?; let pname = matches.value_of("package_name") |