Skip to content

Commit 415bb26

Browse files
Merge #1568
1568: Make crates.io compatible with whatsdeployed.io r=jtgeibel a=notriddle Co-authored-by: Michael Howell <[email protected]>
2 parents 6321ae2 + e75c292 commit 415bb26

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/controllers/site_metadata.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ pub fn show_deployed_sha(req: &mut dyn Request) -> CargoResult<Response> {
99
::std::env::var("HEROKU_SLUG_COMMIT").unwrap_or_else(|_| String::from("unknown"));
1010

1111
#[derive(Serialize)]
12-
struct R {
13-
deployed_sha: String,
12+
struct R<'a> {
13+
deployed_sha: &'a str,
14+
commit: &'a str,
1415
}
15-
Ok(req.json(&R { deployed_sha }))
16+
Ok(req.json(&R {
17+
deployed_sha: &deployed_sha[..],
18+
commit: &deployed_sha[..],
19+
}))
1620
}

0 commit comments

Comments
 (0)