mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 09:36:42 +01:00
non-abbreviated function names
This commit is contained in:
parent
f4f38939d5
commit
a38d103d7d
3 changed files with 7 additions and 7 deletions
|
|
@ -43,7 +43,7 @@ pub(crate) fn entries_under (
|
||||||
if let Some(path) = path {
|
if let Some(path) = path {
|
||||||
let mut others = vec![];
|
let mut others = vec![];
|
||||||
for other in entries.iter_mut() {
|
for other in entries.iter_mut() {
|
||||||
if other.path.starts_with(&path) && !other.is_dir() {
|
if other.path.starts_with(&path) && !other.is_directory() {
|
||||||
others.push(other.info.clone());
|
others.push(other.info.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ impl Entry {
|
||||||
path: path.into(),
|
path: path.into(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
pub fn is_dir (&self) -> bool {
|
pub fn is_directory (&self) -> bool {
|
||||||
matches!(&*self.info.read().unwrap(), Metadata::Directory { .. })
|
matches!(&*self.info.read().unwrap(), Metadata::Directory { .. })
|
||||||
}
|
}
|
||||||
pub fn is_mus (&self) -> bool {
|
pub fn is_music (&self) -> bool {
|
||||||
matches!(&*self.info.read().unwrap(), Metadata::Music { .. })
|
matches!(&*self.info.read().unwrap(), Metadata::Music { .. })
|
||||||
}
|
}
|
||||||
pub fn is_img (&self) -> bool {
|
pub fn is_image (&self) -> bool {
|
||||||
matches!(&*self.info.read().unwrap(), Metadata::Image { .. })
|
matches!(&*self.info.read().unwrap(), Metadata::Image { .. })
|
||||||
}
|
}
|
||||||
pub fn hash (&self) -> Option<Arc<str>> {
|
pub fn hash (&self) -> Option<Arc<str>> {
|
||||||
|
|
|
||||||
|
|
@ -83,11 +83,11 @@ impl Entry {
|
||||||
Some(format!("{indent}{icon} {name}").into())
|
Some(format!("{indent}{icon} {name}").into())
|
||||||
}
|
}
|
||||||
fn icon (&self) -> &'static str {
|
fn icon (&self) -> &'static str {
|
||||||
if self.is_dir() {
|
if self.is_directory() {
|
||||||
Self::ICON_DIRECTORY
|
Self::ICON_DIRECTORY
|
||||||
} else if self.is_img() {
|
} else if self.is_image() {
|
||||||
Self::ICON_IMAGE
|
Self::ICON_IMAGE
|
||||||
} else if self.is_mus() {
|
} else if self.is_music() {
|
||||||
Self::ICON_MUSIC
|
Self::ICON_MUSIC
|
||||||
} else {
|
} else {
|
||||||
Self::ICON_UNKNOWN
|
Self::ICON_UNKNOWN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue