Skip to content

Commit

Permalink
chore: update ada-idna to latest version (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored Sep 29, 2023
1 parent 7e8133d commit f1751ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions include/ada/ada_idna.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-08-29 15:28:19 -0400. Do not edit! */
/* auto-generated on 2023-09-19 15:58:51 -0400. Do not edit! */
/* begin file include/idna.h */
#ifndef ADA_IDNA_H
#define ADA_IDNA_H
Expand Down Expand Up @@ -119,9 +119,8 @@ std::string to_ascii(std::string_view ut8_string);
// https://url.spec.whatwg.org/#forbidden-domain-code-point
bool contains_forbidden_domain_code_point(std::string_view ascii_string);

bool constexpr begins_with(std::u32string_view view,
std::u32string_view prefix);
bool constexpr begins_with(std::string_view view, std::string_view prefix);
bool begins_with(std::u32string_view view, std::u32string_view prefix);
bool begins_with(std::string_view view, std::string_view prefix);

bool constexpr is_ascii(std::u32string_view view);
bool constexpr is_ascii(std::string_view view);
Expand Down
9 changes: 5 additions & 4 deletions src/ada_idna.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-08-29 15:28:19 -0400. Do not edit! */
/* auto-generated on 2023-09-19 15:58:51 -0400. Do not edit! */
/* begin file src/idna.cpp */
/* begin file src/unicode_transcoding.cpp */

Expand Down Expand Up @@ -9387,18 +9387,19 @@ bool is_label_valid(const std::u32string_view label) {

namespace ada::idna {

bool constexpr begins_with(std::u32string_view view,
std::u32string_view prefix) {
bool begins_with(std::u32string_view view, std::u32string_view prefix) {
if (view.size() < prefix.size()) {
return false;
}
// constexpr as of C++20
return std::equal(prefix.begin(), prefix.end(), view.begin());
}

bool constexpr begins_with(std::string_view view, std::string_view prefix) {
bool begins_with(std::string_view view, std::string_view prefix) {
if (view.size() < prefix.size()) {
return false;
}
// constexpr as of C++20
return std::equal(prefix.begin(), prefix.end(), view.begin());
}

Expand Down

0 comments on commit f1751ca

Please sign in to comment.