From 404515f568595e697f8a3a6a61cc4f654f7eda40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 24 Jun 2022 11:14:10 +0200 Subject: [PATCH] image_rpc: Fix "single-char-pattern" clippy warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` error: single-character string constant used as pattern --> src/image_rpc.rs:199:36 | 199 | cid = v[0].replace(":", "_"); | ^^^ help: try using a `char` instead: `':'` | = note: `-D clippy::single-char-pattern` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern ``` Signed-off-by: Fabiano FidĂȘncio --- src/agent/src/image_rpc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent/src/image_rpc.rs b/src/agent/src/image_rpc.rs index 80952d38f..02a26913a 100644 --- a/src/agent/src/image_rpc.rs +++ b/src/agent/src/image_rpc.rs @@ -196,7 +196,7 @@ impl ImageService { let v: Vec<&str> = image.rsplit('/').collect(); if !v[0].is_empty() { // ':' have special meaning for umoci during upack - cid = v[0].replace(":", "_"); + cid = v[0].replace(':', "_"); } else { return Err(anyhow!("Invalid image name. {}", image)); }