Lines Matching refs:Cow
2 use std::borrow::Cow;
347 fn to_str_lossy(&self) -> Cow<str> { in to_str_lossy()
353 Cow::Borrowed(str::from_utf8_unchecked(self.as_bytes())) in to_str_lossy()
367 Cow::Owned(lossy) in to_str_lossy()
491 fn to_os_str_lossy(&self) -> Cow<OsStr> { in to_os_str_lossy()
494 fn imp(bytes: &[u8]) -> Cow<OsStr> { in to_os_str_lossy()
497 Cow::Borrowed(OsStr::from_bytes(bytes)) in to_os_str_lossy()
502 fn imp(bytes: &[u8]) -> Cow<OsStr> { in to_os_str_lossy()
506 Cow::Borrowed(x) => Cow::Borrowed(OsStr::new(x)), in to_os_str_lossy()
507 Cow::Owned(x) => Cow::Owned(OsString::from(x)), in to_os_str_lossy()
562 fn to_path_lossy(&self) -> Cow<Path> { in to_path_lossy()
566 Cow::Borrowed(x) => Cow::Borrowed(Path::new(x)), in to_path_lossy()
567 Cow::Owned(x) => Cow::Owned(PathBuf::from(x)), in to_path_lossy()