Skip to content

Commit

Permalink
address clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonshih committed Mar 31, 2023
1 parent 14de25a commit 5e3ed62
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions agent/src/util/device_plugin_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl DevicePlugin for ConfigurationDevicePluginService {
updated_device
})
.collect::<Vec<v1beta1::Device>>();
if gone_devices.len() == 0 {
if gone_devices.is_empty() {
None
} else {
Some((instance_name.clone(), gone_devices))
Expand Down Expand Up @@ -1196,9 +1196,7 @@ pub async fn terminate_device_plugin_service(

/// This creates a Configuration's unique name
pub fn get_device_configuration_name(config_name: &str) -> String {
format!("{}", config_name)
.replace('.', "-")
.replace('/', "-")
config_name.to_string().replace('.', "-").replace('/', "-")
}

/// This creates an Instance's unique name
Expand Down

0 comments on commit 5e3ed62

Please sign in to comment.