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
|
|
@ -170,7 +170,7 @@ pub enum NodeKind {
|
|||
/// renders it without knowing what any of it means.
|
||||
impl hive_jobq_wire::WireNode for NodeKind {
|
||||
fn label(&self) -> String {
|
||||
self.as_str().to_owned()
|
||||
<&str>::from(self).to_owned()
|
||||
}
|
||||
|
||||
fn data(&self, id: hive_jobq_wire::WireId) -> serde_json::Value {
|
||||
|
|
@ -201,16 +201,6 @@ impl hive_jobq_wire::WireNode for NodeKind {
|
|||
}
|
||||
|
||||
impl NodeKind {
|
||||
/// Wire string for the node's label on the graph wire
|
||||
/// ([`hive_jobq_wire::WireNode::label`]) — derived
|
||||
/// (`#[strum(serialize_all = "snake_case")]`), matching the same
|
||||
/// convention the `#[serde(rename_all = "snake_case")]` tag above
|
||||
/// uses, rather than a 31-arm hand-written match kept in sync with it
|
||||
/// by hand.
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
self.into()
|
||||
}
|
||||
|
||||
/// The agent this node targets, or `""` for agentless kinds
|
||||
/// ([`NodeKind::MetaLock`] on the `hyperhive` pseudo-agent,
|
||||
/// [`NodeKind::Reparent`] which can span multiple agents, and
|
||||
|
|
|
|||
Loading…
Reference in a new issue