Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -27,10 +27,7 @@ impl LibVirtActor {
|
||||
/// Connect to hypervisor
|
||||
pub async fn connect() -> anyhow::Result<Self> {
|
||||
let hypervisor_uri = AppConfig::get().hypervisor_uri.as_deref().unwrap_or("");
|
||||
log::info!(
|
||||
"Will connect to hypvervisor at address '{}'",
|
||||
hypervisor_uri
|
||||
);
|
||||
log::info!("Will connect to hypvervisor at address '{hypervisor_uri}'",);
|
||||
let conn = Connect::open(Some(hypervisor_uri))?;
|
||||
|
||||
Ok(Self { m: conn })
|
||||
@ -102,7 +99,7 @@ impl Handler<GetDomainXMLReq> for LibVirtActor {
|
||||
log::debug!("Get domain XML:\n{}", msg.0.as_string());
|
||||
let domain = Domain::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = domain.get_xml_desc(VIR_DOMAIN_XML_SECURE)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
DomainXML::parse_xml(&xml)
|
||||
}
|
||||
}
|
||||
@ -131,7 +128,7 @@ impl Handler<DefineDomainReq> for LibVirtActor {
|
||||
fn handle(&mut self, mut msg: DefineDomainReq, _ctx: &mut Self::Context) -> Self::Result {
|
||||
let xml = msg.1.as_xml()?;
|
||||
|
||||
log::debug!("Define domain:\n{}", xml);
|
||||
log::debug!("Define domain:\n{xml}");
|
||||
let domain = Domain::define_xml(&self.m, &xml)?;
|
||||
let uuid = XMLUuid::parse_from_str(&domain.get_uuid_string()?)?;
|
||||
|
||||
@ -446,7 +443,7 @@ impl Handler<GetNetworkXMLReq> for LibVirtActor {
|
||||
log::debug!("Get network XML:\n{}", msg.0.as_string());
|
||||
let network = Network::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = network.get_xml_desc(0)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
NetworkXML::parse_xml(&xml)
|
||||
}
|
||||
}
|
||||
@ -602,7 +599,7 @@ impl Handler<GetNWFilterXMLReq> for LibVirtActor {
|
||||
log::debug!("Get network filter XML:\n{}", msg.0.as_string());
|
||||
let filter = NWFilter::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = filter.get_xml_desc(0)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
NetworkFilterXML::parse_xml(xml)
|
||||
}
|
||||
}
|
||||
@ -617,7 +614,7 @@ impl Handler<DefineNWFilterReq> for LibVirtActor {
|
||||
fn handle(&mut self, mut msg: DefineNWFilterReq, _ctx: &mut Self::Context) -> Self::Result {
|
||||
let xml = msg.1.into_xml()?;
|
||||
|
||||
log::debug!("Define network filter:\n{}", xml);
|
||||
log::debug!("Define network filter:\n{xml}");
|
||||
let filter = NWFilter::define_xml(&self.m, &xml)?;
|
||||
let uuid = XMLUuid::parse_from_str(&filter.get_uuid_string()?)?;
|
||||
|
||||
|
Reference in New Issue
Block a user