From b06e3fe2f1bcf7fa897648ab79e301ccab256ac8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 12 Nov 2017 20:16:54 +0100 Subject: Convert a bunch of `to_string()`s to `to_owned()` I had used `to_owned()` previously in other projects, but after looking up the difference (again probably), I decided that it seems better to use `to_owned()`. References: https://users.rust-lang.org/t/to-string-vs-to-owned-for-string-literals/1441/6 http://www.lowlevelmanager.com/2016/02/rust-tostring-vs-toowned-for-string.html --- src/github.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/github.rs') diff --git a/src/github.rs b/src/github.rs index 91e9266..16f1cde 100644 --- a/src/github.rs +++ b/src/github.rs @@ -93,19 +93,19 @@ mod tests { .create(); let commit_ref = CommitRef { - owner: "octocat".to_string(), - repo: "Hello-World".to_string(), - sha: "6dcb09b5b57875f334f61aebed695e2e4193db5e".to_string(), - branch: "not-used".to_string(), + owner: "octocat".to_owned(), + repo: "Hello-World".to_owned(), + sha: "6dcb09b5b57875f334f61aebed695e2e4193db5e".to_owned(), + branch: "not-used".to_owned(), }; update_commit_status( &"token".to_owned(), &commit_ref, &CommitStatus::Success, - "https://jenkins.example.com/job/octocat/3".to_string(), + "https://jenkins.example.com/job/octocat/3".to_owned(), None, - "continuous-integration/jenkins".to_string() + "continuous-integration/jenkins".to_owned() ).expect("Failed to update commit status"); mock.assert(); -- cgit v1.2.3