From a03f661f9ef12848364cebc0e744ba07590b1288 Mon Sep 17 00:00:00 2001 From: Flix Date: Sun, 8 Sep 2024 12:36:00 +0200 Subject: [PATCH] Fix new clippy --- Cargo.toml | 1 + crates/fhir-sdk/src/client/fhir/patch.rs | 12 ++++++++++-- crates/fhir-sdk/src/client/fhir/transaction.rs | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1bd117df..52a3a700 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ unused_extern_crates = "warn" [workspace.lints.clippy] tabs_in_doc_comments = "allow" +allow_attributes_without_reason = "warn" branches_sharing_code = "warn" cast_lossless = "warn" cast_possible_wrap = "warn" diff --git a/crates/fhir-sdk/src/client/fhir/patch.rs b/crates/fhir-sdk/src/client/fhir/patch.rs index 230dfd52..9af1558f 100644 --- a/crates/fhir-sdk/src/client/fhir/patch.rs +++ b/crates/fhir-sdk/src/client/fhir/patch.rs @@ -37,7 +37,11 @@ where (StatusCode, V::OperationOutcome): Into, { /// Start building a new Patch request. - pub fn new(client: Client, resource_type: V::ResourceType, id: &'a str) -> Self { + pub(crate) const fn new( + client: Client, + resource_type: V::ResourceType, + id: &'a str, + ) -> Self { Self { client, resource_type, id, operations: Vec::new() } } @@ -250,7 +254,11 @@ where (StatusCode, V::OperationOutcome): Into, { /// Start building a new Patch request. - pub fn new(client: Client, resource_type: V::ResourceType, id: &'a str) -> Self { + pub(crate) const fn new( + client: Client, + resource_type: V::ResourceType, + id: &'a str, + ) -> Self { Self { client, resource_type, id, operations: Vec::new() } } diff --git a/crates/fhir-sdk/src/client/fhir/transaction.rs b/crates/fhir-sdk/src/client/fhir/transaction.rs index 2c8b1270..4a535c9b 100644 --- a/crates/fhir-sdk/src/client/fhir/transaction.rs +++ b/crates/fhir-sdk/src/client/fhir/transaction.rs @@ -37,7 +37,7 @@ where { /// Create new batch or transaction builder, given whether it is a /// transaction. - pub fn new(client: Client, is_transaction: bool) -> Self { + pub(crate) const fn new(client: Client, is_transaction: bool) -> Self { Self { client, is_transaction, entries: Vec::new() } }