mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
AK: Use StringView as its own peek type
StringView is already a reference type, and copying it is cheap, so we should use it as its own peek type.
This commit is contained in:
parent
b61e670122
commit
dfe3cfa0ba
1 changed files with 2 additions and 0 deletions
|
@ -388,6 +388,8 @@ private:
|
|||
|
||||
template<>
|
||||
struct Traits<StringView> : public DefaultTraits<StringView> {
|
||||
using PeekType = StringView;
|
||||
using ConstPeekType = StringView;
|
||||
static unsigned hash(StringView s) { return s.hash(); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue