parent
af6e413fdb
commit
6ad6cc30ef
1 changed files with 14 additions and 0 deletions
|
@ -1856,6 +1856,20 @@ impl AsRef<Path> for PathBuf {
|
||||||
fn as_ref(&self) -> &Path { self }
|
fn as_ref(&self) -> &Path { self }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[stable(feature = "path_into_iter", since = "1.6.0")]
|
||||||
|
impl<'a> IntoIterator for &'a PathBuf {
|
||||||
|
type Item = &'a OsStr;
|
||||||
|
type IntoIter = Iter<'a>;
|
||||||
|
fn into_iter(self) -> Iter<'a> { self.iter() }
|
||||||
|
}
|
||||||
|
|
||||||
|
#[stable(feature = "path_into_iter", since = "1.6.0")]
|
||||||
|
impl<'a> IntoIterator for &'a Path {
|
||||||
|
type Item = &'a OsStr;
|
||||||
|
type IntoIter = Iter<'a>;
|
||||||
|
fn into_iter(self) -> Iter<'a> { self.iter() }
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue