aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-11-16 23:45:36 +0100
committerTeddy Wing2017-11-16 23:45:36 +0100
commit90ef027f2f36a8cb321b2dcaa8a411425338c200 (patch)
treef466dbd4a25bd1031d7eb0a4244357b208204fc3
parent84d4e100e93a5e3b630eaa355120871af46667d2 (diff)
downloadkipper-90ef027f2f36a8cb321b2dcaa8a411425338c200.tar.bz2
find_and_track_build_and_update_status(): Restore old arg types
I had changed these when I was having trouble passing the values through my double-closure, but now that that's settles, we can revert these types to the way they were before and get rid of the unnecessary `to_owned()` transformations.
-rw-r--r--src/jenkins.rs18
-rw-r--r--src/main.rs4
2 files changed, 6 insertions, 16 deletions
diff --git a/src/jenkins.rs b/src/jenkins.rs
index d61e7d0..038056a 100644
--- a/src/jenkins.rs
+++ b/src/jenkins.rs
@@ -92,21 +92,11 @@ impl Job {
pub fn find_and_track_build_and_update_status(
commit_ref: CommitRef,
- // jenkins_url: String,
- // jenkins_user_id: &String,
- // jenkins_token: &String,
- // github_token: String,
- jenkins_url: &str,
- jenkins_user_id: &str,
- jenkins_token: &str,
- github_token: &str,
+ jenkins_url: String,
+ jenkins_user_id: &String,
+ jenkins_token: &String,
+ github_token: String,
) -> Result<(), Box<Error>> {
- // TODO: Remove this, rest should take same type as arguments maybe
- let jenkins_url = jenkins_url.to_owned();
- let jenkins_user_id = &jenkins_user_id.to_owned();
- let jenkins_token = &jenkins_token.to_owned();
- let github_token = github_token.to_owned();
-
let jenkins_client = jenkins_request_client(
&jenkins_user_id,
&jenkins_token
diff --git a/src/main.rs b/src/main.rs
index 8c4fbfb..211a680 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -152,10 +152,10 @@ fn main() {
match jenkins::find_and_track_build_and_update_status(
commit_ref,
- &jenkins_url,
+ jenkins_url,
&jenkins_user_id,
&jenkins_token,
- &github_token,
+ github_token,
) {
Ok(_) => {},
Err(e) => {