Skip to content

Commit 282e7ac

Browse files
committed
lint
1 parent a154307 commit 282e7ac

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/punycode.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static constexpr int32_t adapt(int32_t d, int32_t n, bool firsttime) {
3939

4040
bool punycode_to_utf32(std::string_view input, std::u32string &out) {
4141
// See https://github.com/whatwg/url/issues/803
42-
if(input.starts_with("xn--")) {
42+
if (input.starts_with("xn--")) {
4343
return false;
4444
}
4545
int32_t written_out{0};
@@ -102,7 +102,7 @@ bool punycode_to_utf32(std::string_view input, std::u32string &out) {
102102
}
103103

104104
bool verify_punycode(std::string_view input) {
105-
if(input.starts_with("xn--")) {
105+
if (input.starts_with("xn--")) {
106106
return false;
107107
}
108108
size_t written_out{0};

src/to_ascii.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static std::string from_ascii_to_ascii(std::string_view ut8_string) {
8787
// If the input is just ASCII, it should not have been encoded
8888
// as punycode.
8989
// https://github.com/whatwg/url/issues/760
90-
if(is_ascii(tmp_buffer)) {
90+
if (is_ascii(tmp_buffer)) {
9191
return error;
9292
}
9393
std::u32string post_map = ada::idna::map(tmp_buffer);
@@ -165,7 +165,7 @@ std::string to_ascii(std::string_view ut8_string) {
165165
// If the input is just ASCII, it should not have been encoded
166166
// as punycode.
167167
// https://github.com/whatwg/url/issues/760
168-
if(is_ascii(tmp_buffer)) {
168+
if (is_ascii(tmp_buffer)) {
169169
return error;
170170
}
171171
std::u32string post_map = ada::idna::map(tmp_buffer);

tests/wpt_tests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ TEST_F(IdnaTestV2, ToAscii) {
8888
#else
8989
std::cout
9090
#endif
91-
<< "Failed to get input string: " << e.what()
92-
<< " for test case: " << json_string;
91+
<< "Failed to get input string: " << e.what()
92+
<< " for test case: " << json_string;
9393
continue;
9494
}
9595

0 commit comments

Comments
 (0)