From 148458202fb061ac3a2f11714c4e4e59a1601777 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 9 Feb 2025 09:58:29 -0800 Subject: [PATCH] Format PR 1437 with clang-format --- include/cxx.h | 5 +++-- tests/ffi/tests.cc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/cxx.h b/include/cxx.h index beaabef0f..874483081 100644 --- a/include/cxx.h +++ b/include/cxx.h @@ -46,8 +46,9 @@ class String final { String(const char16_t *); String(const char16_t *, std::size_t); #if __cplusplus >= 202002L - String(const char8_t *s) : String(reinterpret_cast(s)) {} - String(const char8_t *s, std::size_t len) : String(reinterpret_cast(s), len) {} + String(const char8_t *s) : String(reinterpret_cast(s)) {} + String(const char8_t *s, std::size_t len) + : String(reinterpret_cast(s), len) {} #endif // Replace invalid Unicode data with the replacement character (U+FFFD). diff --git a/tests/ffi/tests.cc b/tests/ffi/tests.cc index 37ffcbda9..d0564bb58 100644 --- a/tests/ffi/tests.cc +++ b/tests/ffi/tests.cc @@ -878,7 +878,8 @@ extern "C" const char *cxx_run_test() noexcept { ASSERT(cstr == "foo"); ASSERT(other_cstr == "test"); - // u8"foo" is `const char*` before, and `const char8_t*` after C++20, so using `auto`. + // u8"foo" is `const char*` before, and `const char8_t*` after C++20, so using + // `auto`. const auto *utf8_literal = u8"Test string"; const char16_t *utf16_literal = u"Test string"; rust::String utf8_rstring = utf8_literal;