Skip to content

Commit

Permalink
Merge pull request #1166 from jiangliu/inode-wrapper-unimplemented
Browse files Browse the repository at this point in the history
rafs: git rid of several unimplemented()
  • Loading branch information
imeoer authored Mar 21, 2023
2 parents 0c1fee4 + 818fe47 commit 0cfd7f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rafs/src/metadata/inode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_mtime,
InodeWrapper::V6(i) => i.i_mtime,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().mtime,
}
}

Expand All @@ -357,7 +357,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_mtime_nsec,
InodeWrapper::V6(i) => i.i_mtime_nsec,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().mtimensec,
}
}

Expand All @@ -376,7 +376,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_blocks,
InodeWrapper::V6(i) => i.i_blocks,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().blocks,
}
}

Expand Down Expand Up @@ -424,7 +424,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_nlink,
InodeWrapper::V6(i) => i.i_nlink,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().nlink,
}
}

Expand Down Expand Up @@ -506,7 +506,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_child_index,
InodeWrapper::V6(_i) => u32::MAX,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_child_index().unwrap_or(u32::MAX),
}
}

Expand Down

0 comments on commit 0cfd7f6

Please sign in to comment.