Skip to content

Remove redundant abs call from Date.Range#15669

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:optimize-date-range-redundant-abs
Jul 25, 2026
Merged

Remove redundant abs call from Date.Range#15669
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:optimize-date-range-redundant-abs

Conversation

@preciz

@preciz preciz commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: GPT 5.6 Sol : Codex CLI

The preceding clauses handle steps that point away from the last date.
last_days - first_days and step have the same sign, so div/2 is already non-negative.

The preceding clauses handle steps that point away from the last date. Otherwise, `last_days - first_days` and `step` have the same sign, so `div/2` is already non-negative.
@josevalim
josevalim merged commit 82e17e8 into elixir-lang:main Jul 25, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants