Skip to content

Commit f7925f6

Browse files
authored
docs: fix typos in code comment (#417)
* docs: fix typo * docs: fix misspellings caught by codespell codespell -L crate,unexpect,OT --skip "*.json" * docs: fix variable name
1 parent 4279e46 commit f7925f6

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

benchmarks/benchmark_template.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ size_t count_rust_invalid() {
563563
// https://twitter.com/ecbos_/status/1627494441656238082?s=61&t=vCdcfSGWHH056CBdklWfCg
564564
static void BasicBench_ServoUrl(benchmark::State& state) {
565565
// Other benchmarks copy the 'standard url' to a structure.
566-
// We try to mimick the effect.
566+
// We try to mimic the effect.
567567
volatile size_t success = 0;
568568

569569
for (auto _ : state) {

benchmarks/performancecounters/apple_arm_events.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static u32 (*kpc_get_counter_count)(u32 classes);
248248

249249
/// Get counter accumulations.
250250
/// If `all_cpus` is true, the buffer count should not smaller than
251-
/// (cpu_count * counter_count). Otherwize, the buffer count should not smaller
251+
/// (cpu_count * counter_count). Otherwise, the buffer count should not smaller
252252
/// than (counter_count).
253253
/// @see kpc_get_counter_count(), kpc_cpu_count().
254254
/// @param all_cpus true for all CPUs, false for current cpu.
@@ -376,7 +376,7 @@ static int kperf_lightweight_pet_set(u32 enabled) {
376376
// These functions do not require root privileges.
377377
// -----------------------------------------------------------------------------
378378

379-
// KPEP CPU archtecture constants.
379+
// KPEP CPU architecture constants.
380380
#define KPEP_ARCH_I386 0
381381
#define KPEP_ARCH_X86_64 1
382382
#define KPEP_ARCH_ARM 2
@@ -416,7 +416,7 @@ typedef struct kpep_db {
416416
usize fixed_counter_count;
417417
usize config_counter_count;
418418
usize power_counter_count;
419-
u32 archtecture; ///< see `KPEP CPU archtecture constants` above.
419+
u32 architecture; ///< see `KPEP CPU architecture constants` above.
420420
u32 fixed_counter_bits;
421421
u32 config_counter_bits;
422422
u32 power_counter_bits;

include/ada/checkers-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace ada::checkers {
1414

1515
inline bool has_hex_prefix_unsafe(std::string_view input) {
16-
// This is actualy efficient code, see has_hex_prefix for the assembly.
16+
// This is actually efficient code, see has_hex_prefix for the assembly.
1717
uint32_t value_one = 1;
1818
bool is_little_endian = (reinterpret_cast<char*>(&value_one)[0] == 1);
1919
uint16_t word0x{};

include/ada/common_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ namespace ada {
242242
#define ADA_DEVELOPMENT_CHECKS 1
243243
#endif // __OPTIMIZE__
244244
#endif // _MSC_VER
245-
#endif // SIMDJSON_DEVELOPMENT_CHECKS
245+
#endif // ADA_DEVELOPMENT_CHECKS
246246

247247
#define ADA_STR(x) #x
248248

include/ada/expected.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ struct default_constructor_tag {
12141214
};
12151215

12161216
// expected_default_ctor_base will ensure that expected has a deleted default
1217-
// consturctor if T is not default constructible.
1217+
// constructor if T is not default constructible.
12181218
// This specialization is for when T is default constructible
12191219
template <class T, class E,
12201220
bool Enable =

include/ada/unicode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ contains_forbidden_domain_code_point_or_upper(const char* input,
9999
size_t length) noexcept;
100100

101101
/**
102-
* Checks if the input is a forbidden doamin code point.
102+
* Checks if the input is a forbidden domain code point.
103103
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
104104
*/
105105
ada_really_inline constexpr bool is_forbidden_domain_code_point(

include/ada/url.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct url : url_base {
152152
[[nodiscard]] const std::string_view get_pathname() const noexcept;
153153

154154
/**
155-
* Compute the pathname length in bytes witout instantiating a view or a
155+
* Compute the pathname length in bytes without instantiating a view or a
156156
* string.
157157
* @return size of the pathname in bytes
158158
* @see https://url.spec.whatwg.org/#dom-url-pathname

include/ada/url_aggregator-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ inline void ada::url_aggregator::add_authority_slashes_if_needed() noexcept {
744744
ADA_ASSERT_TRUE(validate());
745745
// Protocol setter will insert `http:` to the URL. It is up to hostname setter
746746
// to insert
747-
// `//` initially to the buffer, since it depends on the hostname existance.
747+
// `//` initially to the buffer, since it depends on the hostname existence.
748748
if (has_authority()) {
749749
return;
750750
}

include/ada/url_aggregator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct url_aggregator : url_base {
112112
*/
113113
[[nodiscard]] std::string_view get_pathname() const noexcept;
114114
/**
115-
* Compute the pathname length in bytes witout instantiating a view or a
115+
* Compute the pathname length in bytes without instantiating a view or a
116116
* string.
117117
* @return size of the pathname in bytes
118118
* @see https://url.spec.whatwg.org/#dom-url-pathname

src/ada_idna.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9195,7 +9195,7 @@ bool is_label_valid(const std::u32string_view label) {
91959195
// - For Nontransitional Processing, each value must be either valid or
91969196
// deviation.
91979197

9198-
// If CheckJoiners, the label must satisify the ContextJ rules from Appendix
9198+
// If CheckJoiners, the label must satisfy the ContextJ rules from Appendix
91999199
// A, in The Unicode Code Points and Internationalized Domain Names for
92009200
// Applications (IDNA) [IDNA2008].
92019201
constexpr static uint32_t virama[] = {

0 commit comments

Comments
 (0)