Skip to content

Commit

Permalink
Fix default ResponseFmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Barber committed Sep 16, 2022
1 parent 5ccc587 commit dd4b292
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,7 @@ class ServerHttpSensitivityGenerator(

private fun defaultResponseFmt(): MakeFmt {
val type = writable {
rustTemplate(
"""#{SmithyHttpServer}::logging::sensitivity::ResponseFmt<
#{SmithyHttpServer}::logging::sensitivity::MakeIdentity,
#{SmithyHttpServer}::logging::sensitivity::MakeIdentity
>""",
*codegenScope,
)
rustTemplate("#{SmithyHttpServer}::logging::sensitivity::DefaultResponseFmt", *codegenScope)
}

val value = writable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl<Headers, Uri> Debug for RequestFmt<Headers, Uri> {
}
}

/// Default [`RequestFmt`].
pub type DefaultRequestFmt = RequestFmt<MakeIdentity, MakeUri<MakeIdentity, MakeIdentity>>;

impl Default for DefaultRequestFmt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ impl<Headers, StatusCode> Debug for ResponseFmt<Headers, StatusCode> {
}
}

pub type DefaultRequestFmt = ResponseFmt<MakeIdentity, MakeIdentity>;
/// Default [`ResponseFmt`].
pub type DefaultResponseFmt = ResponseFmt<MakeIdentity, MakeIdentity>;

impl Default for DefaultRequestFmt {
impl Default for DefaultResponseFmt {
fn default() -> Self {
Self {
headers: MakeIdentity,
Expand All @@ -43,7 +44,7 @@ impl Default for DefaultRequestFmt {
}
}

impl DefaultRequestFmt {
impl DefaultResponseFmt {
/// Constructs a new [`ResponseFmt`] with no redactions.
pub fn new() -> Self {
Self::default()
Expand Down

0 comments on commit dd4b292

Please sign in to comment.