Skip to content

Commit

Permalink
use RealFsMetadata instead of UnreachableMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn committed Jan 28, 2025
1 parent 7ecb6d8 commit 7619d30
Showing 1 changed file with 1 addition and 67 deletions.
68 changes: 1 addition & 67 deletions src/workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2146,76 +2146,10 @@ pub mod test {

use super::*;

#[derive(Debug)]
pub struct UnreachableMetadata;

impl sys_traits::FsMetadataValue for UnreachableMetadata {
fn file_type(&self) -> sys_traits::FileType {
unreachable!()
}
fn len(&self) -> u64 {
unreachable!()
}
fn accessed(&self) -> std::io::Result<std::time::SystemTime> {
unreachable!()
}
fn created(&self) -> std::io::Result<std::time::SystemTime> {
unreachable!()
}
fn changed(&self) -> std::io::Result<std::time::SystemTime> {
unreachable!()
}
fn modified(&self) -> std::io::Result<std::time::SystemTime> {
unreachable!()
}
fn dev(&self) -> std::io::Result<u64> {
unreachable!()
}
fn ino(&self) -> std::io::Result<u64> {
unreachable!()
}
fn mode(&self) -> std::io::Result<u32> {
unreachable!()
}
fn nlink(&self) -> std::io::Result<u64> {
unreachable!()
}
fn uid(&self) -> std::io::Result<u32> {
unreachable!()
}
fn gid(&self) -> std::io::Result<u32> {
unreachable!()
}
fn rdev(&self) -> std::io::Result<u64> {
unreachable!()
}
fn blksize(&self) -> std::io::Result<u64> {
unreachable!()
}
fn blocks(&self) -> std::io::Result<u64> {
unreachable!()
}
fn is_block_device(&self) -> std::io::Result<bool> {
unreachable!()
}
fn is_char_device(&self) -> std::io::Result<bool> {
unreachable!()
}
fn is_fifo(&self) -> std::io::Result<bool> {
unreachable!()
}
fn is_socket(&self) -> std::io::Result<bool> {
unreachable!()
}
fn file_attributes(&self) -> std::io::Result<u32> {
unreachable!()
}
}

pub struct UnreachableSys;

impl sys_traits::BaseFsMetadata for UnreachableSys {
type Metadata = UnreachableMetadata;
type Metadata = sys_traits::impls::RealFsMetadata;

#[doc(hidden)]
fn base_fs_metadata(
Expand Down

0 comments on commit 7619d30

Please sign in to comment.