Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templater: use .map_or() to silence clippy without sacrificing readability #3992

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

yuja
Copy link
Collaborator

@yuja yuja commented Jun 29, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

Copy link
Collaborator

@ilyagr ilyagr left a comment

Choose a reason for hiding this comment

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

Thanks, this seems to work! Looks better too.

Of course, it's only a matter of time before clippy suggests replacing that with unwrap_or :)

cli/src/commit_templater.rs Outdated Show resolved Hide resolved
@ilyagr
Copy link
Collaborator

ilyagr commented Jun 29, 2024

Cc: rust-lang/rust-clippy#13018

@yuja yuja force-pushed the push-vmnupmmsuzmn branch from 46bd924 to 585908a Compare June 30, 2024 01:17
@yuja yuja enabled auto-merge (rebase) June 30, 2024 01:20
@yuja yuja merged commit 3792f4a into jj-vcs:main Jun 30, 2024
17 checks passed
@yuja yuja deleted the push-vmnupmmsuzmn branch June 30, 2024 01:25
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.

3 participants