image_rpc: Fix "single-char-pattern" clippy warning

```
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 <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2022-06-24 11:14:10 +02:00
parent d21c3c340d
commit 404515f568

View File

@@ -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));
}