diff --git a/src/build/common.rs b/src/build/common.rs index 4f8235e5..709c0464 100644 --- a/src/build/common.rs +++ b/src/build/common.rs @@ -175,8 +175,7 @@ pub trait Build { .get(&Path::Job { name: job_name, configuration, - })? - .json()?) + })?.json()?) } else { Err(client::Error::InvalidUrl { url: self.url().to_string(), @@ -199,8 +198,7 @@ pub trait Build { job_name, number, configuration, - })? - .text()?) + })?.text()?) } else { Err(client::Error::InvalidUrl { url: self.url().to_string(), diff --git a/src/build/mod.rs b/src/build/mod.rs index cb724c47..46840d22 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -34,7 +34,6 @@ impl Jenkins { job_name: Name::Name(job_name.into().0), number: build_number.into(), configuration: None, - })? - .json()?) + })?.json()?) } } diff --git a/src/client.rs b/src/client.rs index a2c60e88..03d2b9d0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -173,7 +173,6 @@ impl super::Jenkins { .get_with_params( &object.into(), parameters.into().map(InternalAdvancedQueryParams::from), - )? - .json()?) + )?.json()?) } } diff --git a/src/client_internals/csrf.rs b/src/client_internals/csrf.rs index 84eab57b..f4432773 100644 --- a/src/client_internals/csrf.rs +++ b/src/client_internals/csrf.rs @@ -69,8 +69,7 @@ mod tests { "crumbRequestField":"Invalid-Crumb" } "#, - ) - .create(); + ).create(); let crumb = jenkins_client.get_csrf(); diff --git a/src/client_internals/errors.rs b/src/client_internals/errors.rs index bab16119..a9b15067 100644 --- a/src/client_internals/errors.rs +++ b/src/client_internals/errors.rs @@ -13,7 +13,10 @@ pub enum Error { }, /// Error thrown when CSRF protection use an unexpected field name - #[fail(display = "invalid crumbfield '{}', expected 'Jenkins-Crumb'", field_name)] + #[fail( + display = "invalid crumbfield '{}', expected 'Jenkins-Crumb'", + field_name + )] InvalidCrumbFieldName { /// Field name provided by Jenkins api for crumb field_name: String, @@ -37,7 +40,12 @@ pub enum Error { UnsupportedBuildConfiguration, /// Error when trying to do an action on an object not supporting it - #[fail(display = "can't do '{}' on a {} of type {}", action, object_type, variant_name)] + #[fail( + display = "can't do '{}' on a {} of type {}", + action, + object_type, + variant_name + )] InvalidObjectType { /// Object type object_type: ExpectedType, diff --git a/src/job/mod.rs b/src/job/mod.rs index efb6a311..4a5da0c8 100644 --- a/src/job/mod.rs +++ b/src/job/mod.rs @@ -39,8 +39,7 @@ impl Jenkins { .get(&Path::Job { name: Name::Name(job_name.into().0), configuration: None, - })? - .json()?) + })?.json()?) // self.get_job_as(job_name, None) } diff --git a/src/lib.rs b/src/lib.rs index 5152c102..e0525c49 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,17 @@ #![deny( - warnings, missing_debug_implementations, missing_copy_implementations, trivial_casts, - trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces, - unused_qualifications, missing_docs, unused_extern_crates, unused_qualifications, unused_results + warnings, + missing_debug_implementations, + missing_copy_implementations, + trivial_casts, + trivial_numeric_casts, + unsafe_code, + unstable_features, + unused_import_braces, + unused_qualifications, + missing_docs, + unused_extern_crates, + unused_qualifications, + unused_results )] //! Bindings to [Jenkins JSON API](https://wiki.jenkins.io/display/JENKINS/Remote+access+API) diff --git a/src/nodes/computer.rs b/src/nodes/computer.rs index 6bc4d24b..64ba2f56 100644 --- a/src/nodes/computer.rs +++ b/src/nodes/computer.rs @@ -77,7 +77,7 @@ macro_rules! computer_with_common_fields_and_impl { /// One off executors of the computer pub one_off_executors: Vec, - // TODO: actions, assignedLabels, loadStatistics + // TODO: actions, assignedLabels, loadStatistics $( $(#[$field_attr])* diff --git a/src/nodes/mod.rs b/src/nodes/mod.rs index bfd6be0f..13002968 100644 --- a/src/nodes/mod.rs +++ b/src/nodes/mod.rs @@ -37,8 +37,7 @@ impl Jenkins { Ok(self .get(&Path::Computer { name: Name::Name(&computer_name.into().0), - })? - .json()?) + })?.json()?) } /// Get the master `Computer` @@ -46,7 +45,6 @@ impl Jenkins { Ok(self .get(&Path::Computer { name: Name::Name("(master)"), - })? - .json()?) + })?.json()?) } } diff --git a/src/view.rs b/src/view.rs index b23482d3..df7f5201 100644 --- a/src/view.rs +++ b/src/view.rs @@ -169,8 +169,7 @@ impl Jenkins { Ok(self .get(&Path::View { name: Name::Name(&view_name.into().0), - })? - .json()?) + })?.json()?) } /// Add the job `job_name` to the view `view_name` diff --git a/tests/client.rs b/tests/client.rs index 086eef5d..1196d900 100644 --- a/tests/client.rs +++ b/tests/client.rs @@ -720,8 +720,7 @@ fn can_get_by_path_with_tree() { .with_subfield("number") .with_subfield("duration") .with_subfield("result"), - ) - .build(), + ).build(), ); assert!(r.is_ok());