mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-24 08:44:21 +01:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user