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

# Make sure that there are no SemVer violations before publishing.
# https://github.com/obi1kenobi/cargo-semver-checks-action
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
Copy link
Owner

Choose a reason for hiding this comment

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

Hey @Iizuki do you think we could move this to a different PR?

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?

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