Skip to content

Commit 789fd8d

Browse files
authored
fix typo (#11010)
1 parent d32896a commit 789fd8d

9 files changed

Lines changed: 11 additions & 11 deletions

File tree

std/algorithm/searching.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@ if (isForwardRange!R1 && isForwardRange!R2
21632163
return haystack[haystack.length .. haystack.length];
21642164
}
21652165
// Optimization in case the ranges are both SortedRanges.
2166-
// Binary search can be used to find the first occurence
2166+
// Binary search can be used to find the first occurrence
21672167
// of the first element of the needle in haystack.
21682168
// When it is found O(walklength(needle)) steps are performed.
21692169
// https://issues.dlang.org/show_bug.cgi?id=8829 enhancement

std/array.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2356,7 +2356,7 @@ if (isInputRange!RoR &&
23562356
emplaceRef(result[len++], e);
23572357
}
23582358
assert(len == result.length, format!
2359-
"len %s must equal result.lenght %s"(len, result.length));
2359+
"len %s must equal result.length %s"(len, result.length));
23602360
return (() @trusted => cast(RetType) result)();
23612361
}
23622362
}

std/conv.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ if (!(is(S : T) &&
10511051
{
10521052
import std.array : appender;
10531053
// other string-to-string
1054-
//Use Appender directly instead of toStr, which also uses a formatedWrite
1054+
// Use Appender directly instead of toStr, which also uses a formattedWrite
10551055
auto w = appender!T();
10561056
w.put(value);
10571057
return w.data;

std/logger/core.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,7 @@ version (StdUnittest) private void testFuncNames(Logger logger) @safe
25222522
~ format(" gllOff(%s) llOff(%s) " ~
25232523
"llVSgll(%s) tllVSll(%s) " ~
25242524
"tllOff(%s) condFalse(%s) "
2525-
~ "shoudlLog(%s)",
2525+
~ "shouldLog(%s)",
25262526
gll != LogLevel.off,
25272527
ll != LogLevel.off, llVSgll,
25282528
tllVSll, tllOff, condFalse,

std/math/rounding.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ T floorImpl(T)(const T x) @trusted pure nothrow @nogc
959959

960960
if ((y.vi & fraction_mask) != 0)
961961
{
962-
// If 'x' is negative, then first substract (1.0 - T.epsilon) from the value.
962+
// If 'x' is negative, then first subtract (1.0 - T.epsilon) from the value.
963963
if (y.vi >> sign_shift)
964964
y.vi += fraction_mask;
965965
y.vi &= ~fraction_mask;

std/process.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ private:
469469
if (lenRead == 0)
470470
{
471471
immutable err = GetLastError();
472-
if (err == NO_ERROR) // sucessfully read a 0-length variable
472+
if (err == NO_ERROR) // successfully read a 0-length variable
473473
return sink("");
474474
if (err == ERROR_ENVVAR_NOT_FOUND) // variable didn't exist
475475
return sink(null);

std/stdio.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4967,7 +4967,7 @@ struct lines
49674967
}
49684968
}
49694969
// can only reach when _FGETC returned -1
4970-
if (!f.eof) throw new StdioException("Error in reading file"); // error occured
4970+
if (!f.eof) throw new StdioException("Error in reading file"); // error occurred
49714971
return result;
49724972
}
49734973
}
@@ -5201,7 +5201,7 @@ private struct ChunksImpl
52015201
assert(r <= size);
52025202
if (r != size)
52035203
{
5204-
// error occured
5204+
// error occurred
52055205
if (!f.eof) throw new StdioException(null);
52065206
buffer.length = r;
52075207
}

std/uuid.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ public class UUIDParsingException : Exception
20122012
this.input = input;
20132013
this.position = pos;
20142014
this.reason = why;
2015-
string message = format("An error occured in the UUID parser: %s\n" ~
2015+
string message = format("An error occurred in the UUID parser: %s\n" ~
20162016
" * Input:\t'%s'\n * Position:\t%s", msg, replace(replace(input,
20172017
"\r", "\\r"), "\n", "\\n"), pos);
20182018
super(message, file, line, next);

std/variant.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ switchStmtTupAssign:
680680
static if (is(A == U[n], U, size_t n))
681681
auto p = cast(A*) (new U[n]).ptr;
682682
else
683-
// object will be intialized later. Using malloc in case `this()` is disabled
683+
// object will be initialized later. Using malloc in case `this()` is disabled
684684
A* p = cast(A*) GC.malloc(A.sizeof, 0, typeid(A));
685685
// Emplace will run the postblit of `A` us, no need to do it manually, then
686686
copyEmplace(*zis, *p);
@@ -790,7 +790,7 @@ public:
790790
static if (is(T == U[n], U, size_t n))
791791
T* p = cast(T*) (new U[n]).ptr;
792792
else
793-
// object will be intialized later. Using malloc in case `this()` is disabled
793+
// object will be initialized later. Using malloc in case `this()` is disabled
794794
T* p = cast(T*) GC.malloc(T.sizeof, 0, typeid(T));
795795
copyEmplace(rhs, *p);
796796
*(cast(T**) &store) = p;

0 commit comments

Comments
 (0)