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

Fix deprecations warnings from stdlib #62

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ links = [

[dependencies]
gleam_stdlib = "~> 0.32"
gleam_regexp = ">= 1.0.0 and < 2.0.0"

[dev-dependencies]
gleeunit = "~> 1.0"
6 changes: 3 additions & 3 deletions src/gleam/http/cookie.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gleam/http.{type Scheme}
import gleam/int
import gleam/list
import gleam/option.{type Option, Some}
import gleam/regex
import gleam/regexp
import gleam/result
import gleam/string

Expand Down Expand Up @@ -97,8 +97,8 @@ pub fn set_header(name: String, value: String, attributes: Attributes) -> String
/// discarded.
///
pub fn parse(cookie_string: String) -> List(#(String, String)) {
let assert Ok(re) = regex.from_string("[,;]")
regex.split(re, cookie_string)
let assert Ok(re) = regexp.from_string("[,;]")
regexp.split(re, cookie_string)
|> list.filter_map(fn(pair) {
case string.split_once(string.trim(pair), "=") {
Ok(#("", _)) -> Error(Nil)
Expand Down
Loading