Skip to content

Conversation

@Iizuki
Copy link

@Iizuki Iizuki commented Jan 5, 2026

Hey, and happy 2026!

Here's the PR I promised before holidays.

Changes

Manual Debug impl

The main point of this PR. Replace the derived Debug implementation with a manual impl that redacts the password field.

Example output:

Credentials { user_id: "username", password: "REDACTED" }

Misc housekeeping

  • Rust 2024 edition: fmt reordered one import
  • Stop tracking Cargo.lock unnecessarily
  • A couple typos
  • Added cargo-semver-checks to release workflow. Couldn't test this myself but it should work with defaults

Issue Refs

fixes: #12

Copy link
Owner

@LeoBorai LeoBorai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Iizuki thanks so much for openning this PR! Happy new year for you too!

  • I would suggest moving CI/CD related changes to its own PR
  • Adding a small check on the REDACTED text to be present so we make sure both:
    • Password is not rendered
    • The expected text its rendered

let debugged = format!("{credentials:?}");
let pretty = format!("{credentials:#?}");

assert!(!debugged.contains(password));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a check for REDACTED?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it out intentionally so as not to be flaky wrt. changes in the text, but ya I can add it. Just means that the test will need to be updated if someone wants to change the text.

This reverts commit 187685a.

It will be included in a separate pull request.
@Iizuki Iizuki mentioned this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid printing out the password

2 participants