Auto merge of #29514 - apasel422:issue-26220, r=alexcrichton

Closes #26220.

r? @alexcrichton
This commit is contained in:
bors 2015-11-03 04:52:12 +00:00
commit 3330f54198

View File

@ -1879,6 +1879,20 @@ impl AsRef<Path> for PathBuf {
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)]
mod tests {
use super::*;