remove as_str() legacy wrappers, callers use .into() directly
This commit is contained in:
parent
299add158f
commit
46456f75ce
25 changed files with 46 additions and 128 deletions
|
|
@ -719,7 +719,7 @@ fn render(declaration: &swarm_queue_client::wanted::HiveWanted) -> Vec<AgentDecl
|
|||
.iter()
|
||||
.map(|(agent, wanted)| AgentDeclaration {
|
||||
agent: agent.clone(),
|
||||
state: wanted.state.as_str().to_owned(),
|
||||
state: <&str>::from(wanted.state).to_owned(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
|
@ -1000,7 +1000,7 @@ async fn get_agents_status(
|
|||
.get(hive)?
|
||||
.agents
|
||||
.get(&row.name)
|
||||
.map(|w| w.state.as_str().to_owned())
|
||||
.map(|w| <&str>::from(w.state).to_owned())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue