Auto merge of #5287 - matklad:safer-intern, r=Eh2406
authorbors <bors@rust-lang.org>
Tue, 3 Apr 2018 22:50:12 +0000 (22:50 +0000)
committerbors <bors@rust-lang.org>
Tue, 3 Apr 2018 22:50:12 +0000 (22:50 +0000)
commit9da0b7cdb82db61adecaad94f7b959e171704749
tree752f6b62e772968ac6113f3010656b217881acfa
parentf0828058aed46283b02180cb7cb982d52c6c2770
parentd9880c3da58e347807dd57e9092e5c0de6facb95
Auto merge of #5287 - matklad:safer-intern, r=Eh2406

Slightly improve InternedString

* Use `&'static str` instead of (ptr, len) pair to reduce unsafety.
* try make hash calculation O(1) instead of O(n), fail miserably,
  document findings.
* Rename `to_inner` -> `as_str()`.