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

difference_of_squares: Sync tests & add template #2047

Merged
merged 1 commit into from
Mar 1, 2025

Conversation

ellnix
Copy link
Contributor

@ellnix ellnix commented Mar 1, 2025

I considered adding the tera_text_filters crate but decided on if statements to avoid adding more dependencies.

With a snake_case filter, the template could be written without the function variable.

P. S.: I didn't forget to run update-exercise there is just no diff on the test file.

[no important files changed]

I considered adding the [tera_text_filters](https://docs.rs/tera-text-filters/latest/tera_text_filters/)
crate but decided on if statements to avoid adding more dependencies.

With a snake_case filter, the template could be written without the
`function` variable.
@senekor
Copy link
Contributor

senekor commented Mar 1, 2025

I don't think getting rid of the if statement is worth adding a dependency. You could implement a simple version of such a filter yourself if you wanted to.

@ellnix
Copy link
Contributor Author

ellnix commented Mar 1, 2025

I don't think getting rid of the if statement is worth adding a dependency. You could implement a simple version of such a filter yourself if you wanted to.

Agreed, one if statement is no big deal, if it comes up in another template I'll probably make a short naive snake_case. I'm glad I got your opinion on it first 😄

@ellnix ellnix merged commit 7b9ac8f into exercism:main Mar 1, 2025
12 checks passed
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.

2 participants