Skip to content
Open
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
3 changes: 3 additions & 0 deletions src/implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ std::optional<bool> try_can_parse_absolute_fast(
template <class result_type>
ada_warn_unused tl::expected<result_type, errors> parse(
std::string_view input, const result_type* base_url) {
// Single try_parse lives inside parse_url_impl. Do not call try_parse here
// as well: IPv4/IPv6 (and other non-simple) inputs would pay the fast-path
// reject twice and show large CodSpeed regressions on those benches.
result_type u = ada::parser::parse_url_impl<result_type>(input, base_url);
if (!u.is_valid) {
return tl::unexpected(errors::type_error);
Expand Down
Loading
Loading