-impl Deref for Interned<PathBuf> {
- type Target = Path;
- fn deref(&self) -> &'static Path {
- let l = INTERNER.paths.lock().unwrap();
- unsafe { mem::transmute::<&Path, &'static Path>(l.get(*self)) }
- }
-}
-
-impl AsRef<Path> for Interned<PathBuf> {
- fn as_ref(&self) -> &'static Path {
- let l = INTERNER.paths.lock().unwrap();
- unsafe { mem::transmute::<&Path, &'static Path>(l.get(*self)) }
- }
-}
-
-impl AsRef<Path> for Interned<String> {
- fn as_ref(&self) -> &'static Path {
- let l = INTERNER.strs.lock().unwrap();
- unsafe { mem::transmute::<&Path, &'static Path>(l.get(*self).as_ref()) }
- }
-}
-
-impl AsRef<OsStr> for Interned<PathBuf> {
- fn as_ref(&self) -> &'static OsStr {
- let l = INTERNER.paths.lock().unwrap();
- unsafe { mem::transmute::<&OsStr, &'static OsStr>(l.get(*self).as_ref()) }
- }
-}
-
-impl AsRef<OsStr> for Interned<String> {
- fn as_ref(&self) -> &'static OsStr {
- let l = INTERNER.strs.lock().unwrap();
- unsafe { mem::transmute::<&OsStr, &'static OsStr>(l.get(*self).as_ref()) }
- }
-}
-
-impl PartialOrd<Interned<String>> for Interned<String> {