Skip to content
Unverified Commit e76a8a0e authored by david-perez's avatar david-perez Committed by GitHub
Browse files

Refactor `redactIfNecessary` function (#1746)

It's useful to call `redactIfNecessary` on arbitrary shape types, not
only member shapes.

It is now an extension function on `Shape`, with a specialization on
`MemberShape`, since note that the `sensitive` trait cannot be applied
to member shapes [0, 1], so we traverse to its target directly.

Ultimately this is just to make the diff of #1342 lighter.

[0]: https://awslabs.github.io/smithy/1.0/spec/core/documentation-traits.html#sensitive-trait
[1]: https://awslabs.github.io/smithy/1.0/spec/core/documentation-traits.html#sensitive-trait
parent 43e3e298
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment