Skip to content

Fix warning about negative steps on Elixir 1.16 #67

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidwebster48
Copy link

When I run the formatter, I get this warning...

warning: negative steps are not supported in String.slice/2, pass 1..-2//1 instead
  (elixir 1.16.0) lib/string.ex:2368: String.slice/2
  (surface_formatter 0.7.5) lib/surface/formatter/phases/render.ex:133: Surface.Formatter.Phases.Render.render_node/2
  (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
  (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
  (surface_formatter 0.7.5) lib/surface/formatter/phases/render.ex:189: Surface.Formatter.Phases.Render.render_node/2
  (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

This PR should fix it.

Copy link
Collaborator

@paulstatezny paulstatezny left a comment

Choose a reason for hiding this comment

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

Thank you!

@paulstatezny
Copy link
Collaborator

@msaraiva Good to merge this?

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