slog
slog copied to clipboard
Use Borrow<T> for keys instead of custom types
Why not use Borrow<T>
for keys instead of custom types?
-
Key
can be replaced with genericK: Borrow<str>
-
OwnedKV
andBorrowedKV
can be replaced withT: Borrow<KV>
I believe it's due to object safety of Serializer