Skip to content

Commit

Permalink
fix: Leftover clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiesler committed May 24, 2024
1 parent c000481 commit 888307d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
//! > Want to implement your own? If it is a common strategy, please consider opening a PR to add it to the library.
//! Otherwise, we are open to turning this into an open trait so that you can implement your own strategy.

#![allow(clippy::map_clone, clippy::large_enum_variant)]
#![warn(clippy::unwrap_used, clippy::missing_panics_doc)]
#![allow(clippy::large_enum_variant)]
#![warn(clippy::missing_panics_doc)]
#![forbid(unsafe_code)]
// Workaround
#![allow(ambiguous_glob_reexports)]
Expand Down
2 changes: 1 addition & 1 deletion src/resources/checkout_session_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ impl CheckoutSession {
id: &CheckoutSessionId,
params: &RetrieveCheckoutSessionLineItems,
) -> Response<List<CheckoutSessionItem>> {
client.get_query(&format!("/checkout/sessions/{}/line_items", id), &params)
client.get_query(&format!("/checkout/sessions/{}/line_items", id), params)
}
}
12 changes: 3 additions & 9 deletions src/resources/customer_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::resources::{
BankAccount, Customer, PaymentMethod, PaymentSource, PaymentSourceParams, Source,
};

#[derive(Clone, Debug, Serialize, Eq, PartialEq)]
#[derive(Clone, Debug, Serialize, Default, Eq, PartialEq)]
pub struct CustomerPaymentMethodRetrieval<'a> {
/// A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list.
///For instance, if you make a list request and receive 100 objects, starting with `obj_bar`,
Expand Down Expand Up @@ -37,13 +37,7 @@ pub struct CustomerPaymentMethodRetrieval<'a> {

impl<'a> CustomerPaymentMethodRetrieval<'a> {
pub fn new() -> Self {
CustomerPaymentMethodRetrieval {
ending_before: None,
expand: &[],
limit: None,
starting_after: None,
type_: None,
}
CustomerPaymentMethodRetrieval::default()
}
}

Expand Down Expand Up @@ -83,7 +77,7 @@ pub struct CustomerSearchParams<'a> {

impl<'a> CustomerSearchParams<'a> {
pub fn new() -> CustomerSearchParams<'a> {
CustomerSearchParams { query: String::new(), limit: None, page: None, expand: &[] }
CustomerSearchParams::default()
}
}

Expand Down

0 comments on commit 888307d

Please sign in to comment.