Skip to content

Commit bbf0c99

Browse files
committed
add SmallString.toHash
1 parent 713f77f commit bbf0c99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/mir/small_string.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ scope const:
289289
{
290290
return __cmp(opIndex, str);
291291
}
292+
293+
///
294+
extern (D) auto toHash() const nothrow @safe
295+
{
296+
return hashOf(this[]);
297+
}
292298
}
293299

294300
///

0 commit comments

Comments
 (0)