anderslanglands / ustr

Fast, FFI-friendly string interning for Rust
Other
151 stars 26 forks source link

impl Default and Deref for Ustr #6

Closed cormacrelf closed 4 years ago

cormacrelf commented 4 years ago

String::default() is an empty string, so this impl does the same.

Deref is also implemented by String and other string interners e.g. string-cache.

Obviously both are pretty convenient, and help Ustr act as a drop-in replacement better.

anderslanglands commented 4 years ago

Thanks for the PR!