Unverified Commit bb8774a9 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Fix signing params debug impl (#2563)

parent cf431506
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
    unreachable_pub
)]

use std::fmt;
use std::time::SystemTime;

pub mod sign;
@@ -29,7 +30,6 @@ pub mod http_request;

/// Parameters to use when signing.
#[non_exhaustive]
#[derive(Debug)]
pub struct SigningParams<'a, S> {
    /// Access Key ID to use.
    pub(crate) access_key: &'a str,
@@ -49,6 +49,20 @@ pub struct SigningParams<'a, S> {
    pub(crate) settings: S,
}

impl<'a, S: fmt::Debug> fmt::Debug for SigningParams<'a, S> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.debug_struct("SigningParams")
            .field("access_key", &"** redacted **")
            .field("secret_key", &"** redacted **")
            .field("security_token", &"** redacted **")
            .field("region", &self.region)
            .field("service_name", &self.service_name)
            .field("time", &self.time)
            .field("settings", &self.settings)
            .finish()
    }
}

impl<'a, S: Default> SigningParams<'a, S> {
    /// Returns a builder that can create new `SigningParams`.
    pub fn builder() -> signing_params::Builder<'a, S> {
+1 −1

File changed.

Contains only whitespace changes.