Switch to padding reference as variable not consumed

This commit is contained in:
Daniel Lockyer 2017-03-31 17:09:50 +01:00
parent e059fb5ba7
commit b68627ce1a

View File

@ -15,11 +15,11 @@ pub trait FileAttributes {
#[cfg(any(target_os = "macos", target_os = "linux"))]
impl FileAttributes for Path {
fn attributes(&self) -> io::Result<Vec<Attribute>> {
list_attrs(lister::Lister::new(FollowSymlinks::Yes), &self)
list_attrs(&lister::Lister::new(FollowSymlinks::Yes), self)
}
fn symlink_attributes(&self) -> io::Result<Vec<Attribute>> {
list_attrs(lister::Lister::new(FollowSymlinks::No), &self)
list_attrs(&lister::Lister::new(FollowSymlinks::No), self)
}
}
@ -50,7 +50,7 @@ pub struct Attribute {
}
#[cfg(any(target_os = "macos", target_os = "linux"))]
pub fn list_attrs(lister: lister::Lister, path: &Path) -> io::Result<Vec<Attribute>> {
pub fn list_attrs(lister: &lister::Lister, path: &Path) -> io::Result<Vec<Attribute>> {
use std::ffi::CString;
let c_path = match path.to_str().and_then(|s| { CString::new(s).ok() }) {