Skip to content

Fix a warning in Elixir 1.16#2

Open
il-tmfv wants to merge 1 commit intogunnar2k:masterfrom
il-tmfv:patch-1
Open

Fix a warning in Elixir 1.16#2
il-tmfv wants to merge 1 commit intogunnar2k:masterfrom
il-tmfv:patch-1

Conversation

@il-tmfv
Copy link
Copy Markdown

@il-tmfv il-tmfv commented May 24, 2024

In Elixir 1.16 calls like String.slice(key, 1..-1) produce warnings:

warning: negative steps are not supported in String.slice/2, pass 1..-1//1 instead

1..-1//1 option is not suitable for people on Elixir < 1.12, so here I use String.slice/3.

In Elixir 1.16 calls like `String.slice(key, 1..-1)` produce warnings:
```
warning: negative steps are not supported in String.slice/2, pass 1..-1//1 instead
```

`1..-1//1` option is not suitable for people on Elixir < 1.12, so here I use `String.slice/3`.
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.

1 participant