Skip to content

Commit

Permalink
Use string ref instead of cloned owned string
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefmoazzam committed Jan 30, 2025
1 parent 9347cab commit d484744
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions graph-proxy/src/graphql/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ struct WorkflowPendingStatus<'a>(&'a IoArgoprojWorkflowV1alpha1WorkflowStatus);
#[Object]
impl WorkflowPendingStatus<'_> {
/// A human readable message indicating details about why the workflow is in this condition
async fn message(&self) -> Option<String> {
self.0.message.clone()
async fn message(&self) -> Option<&str> {
self.0.message.as_deref()
}
}

Expand All @@ -163,8 +163,8 @@ impl WorkflowRunningStatus<'_> {
}

/// A human readable message indicating details about why the workflow is in this condition
async fn message(&self) -> Option<String> {
self.manifest.message.clone()
async fn message(&self) -> Option<&str> {
self.manifest.message.as_deref()
}

/// Tasks created by the workflow
Expand Down Expand Up @@ -231,8 +231,8 @@ impl WorkflowCompleteStatus<'_> {
}

/// A human readable message indicating details about why the workflow is in this condition
async fn message(&self) -> Option<String> {
self.manifest.message.clone()
async fn message(&self) -> Option<&str> {
self.manifest.message.as_deref()
}

/// Tasks created by the workflow
Expand Down

0 comments on commit d484744

Please sign in to comment.