Skip to content

Commit

Permalink
Fix new clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Flix committed Sep 8, 2024
1 parent c0d415b commit a03f661
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 10 additions & 2 deletions crates/fhir-sdk/src/client/fhir/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ where
(StatusCode, V::OperationOutcome): Into<Error>,
{
/// Start building a new Patch request.
pub fn new(client: Client<V>, resource_type: V::ResourceType, id: &'a str) -> Self {
pub(crate) const fn new(
client: Client<V>,
resource_type: V::ResourceType,
id: &'a str,
) -> Self {
Self { client, resource_type, id, operations: Vec::new() }
}

Expand Down Expand Up @@ -250,7 +254,11 @@ where
(StatusCode, V::OperationOutcome): Into<Error>,
{
/// Start building a new Patch request.
pub fn new(client: Client<V>, resource_type: V::ResourceType, id: &'a str) -> Self {
pub(crate) const fn new(
client: Client<V>,
resource_type: V::ResourceType,
id: &'a str,
) -> Self {
Self { client, resource_type, id, operations: Vec::new() }
}

Expand Down
2 changes: 1 addition & 1 deletion crates/fhir-sdk/src/client/fhir/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ where
{
/// Create new batch or transaction builder, given whether it is a
/// transaction.
pub fn new(client: Client<V>, is_transaction: bool) -> Self {
pub(crate) const fn new(client: Client<V>, is_transaction: bool) -> Self {
Self { client, is_transaction, entries: Vec::new() }
}

Expand Down

0 comments on commit a03f661

Please sign in to comment.