Skip to content

Commit

Permalink
inline metadata methods
Browse files Browse the repository at this point in the history
  • Loading branch information
geckoxx committed May 20, 2021
1 parent 22926d1 commit c7af0e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_asset/src/io/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ pub enum FileType {
}

impl FileType {
#[inline]
pub const fn is_dir(&self) -> bool {
matches!(self, Self::Directory)
}

#[inline]
pub const fn is_file(&self) -> bool {
matches!(self, Self::File)
}
Expand Down Expand Up @@ -44,10 +46,12 @@ pub struct Metadata {
}

impl Metadata {
#[inline]
pub const fn is_dir(&self) -> bool {
self.file_type.is_dir()
}

#[inline]
pub const fn is_file(&self) -> bool {
self.file_type.is_file()
}
Expand Down

0 comments on commit c7af0e7

Please sign in to comment.