summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2020-06-04 23:40:53 -0400
committerOwen Jacobson <owen@grimoire.ca>2020-06-04 23:40:53 -0400
commitc9ebd546c1e1d1dd3457ea393103bdb54fa23bd6 (patch)
tree2a3385f4e67c36282b475fccc4ef717908434010 /src
parent1c64c00e399603aad41098c6957d4f2bb7c59f22 (diff)
Reduce spurious copies.
Diffstat (limited to 'src')
-rw-r--r--src/view.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view.rs b/src/view.rs
index 5601d5e..09c04a3 100644
--- a/src/view.rs
+++ b/src/view.rs
@@ -239,9 +239,9 @@ async fn index(
}
#[derive(Serialize)]
-struct SlackMessage {
+struct SlackMessage<'a> {
response_type: &'static str,
- text: String,
+ text: &'a String,
}
#[post("/slack/troubleshoot")]
@@ -257,7 +257,7 @@ async fn slack_troubleshoot(
let response = SlackMessage{
response_type: "in_channel",
- text: thing.markdown.clone(),
+ text: &thing.markdown,
};
Ok(HttpResponse::Ok().json(response))