Adapt ignored workspace attributes to Rust 1.97 lint
This commit is contained in:
parent
ea463a6ca7
commit
aef24440a5
2 changed files with 5 additions and 5 deletions
|
|
@ -449,10 +449,10 @@ impl IgnoredWorkspace {
|
|||
}
|
||||
|
||||
fn attributes(&self, entry: &ResolvedEntry) -> io::Result<FileAttr> {
|
||||
self.attributes_for_inode(self.inode_for(entry), entry.stat)
|
||||
Self::attributes_for_inode(self.inode_for(entry), entry.stat)
|
||||
}
|
||||
|
||||
fn attributes_for_inode(&self, inode: INodeNo, stat: rustix::fs::Stat) -> io::Result<FileAttr> {
|
||||
fn attributes_for_inode(inode: INodeNo, stat: rustix::fs::Stat) -> io::Result<FileAttr> {
|
||||
Ok(FileAttr {
|
||||
ino: inode,
|
||||
size: u64::try_from(stat.st_size)
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@ impl Filesystem for IgnoredWorkspace {
|
|||
let result = if let Some(handle) = handle {
|
||||
self.with_file(handle, |open| {
|
||||
let stat = fstat(open.file.as_fd())?;
|
||||
self.attributes_for_inode(inode, stat)
|
||||
Self::attributes_for_inode(inode, stat)
|
||||
})
|
||||
} else if let Some(open) = self.open_file_for_inode(inode) {
|
||||
fstat(open.file.as_fd())
|
||||
.map_err(Into::into)
|
||||
.and_then(|stat| self.attributes_for_inode(inode, stat))
|
||||
.and_then(|stat| Self::attributes_for_inode(inode, stat))
|
||||
} else {
|
||||
self.path_for(inode).and_then(|path| {
|
||||
let snapshot = self.classifier.snapshot_for(&path);
|
||||
|
|
@ -123,7 +123,7 @@ impl Filesystem for IgnoredWorkspace {
|
|||
)?;
|
||||
}
|
||||
self.record_changed(open.backing, &open.path);
|
||||
self.attributes_for_inode(inode, fstat(open.file.as_fd())?)
|
||||
Self::attributes_for_inode(inode, fstat(open.file.as_fd())?)
|
||||
};
|
||||
let result = if let Some(handle) = handle {
|
||||
self.with_file(handle, operation)
|
||||
|
|
|
|||
Loading…
Reference in a new issue