Fix files naming #24

Merged
blek merged 3 commits from fix-naming into 0.2-dev 2023-12-11 00:56:44 +01:00
1 changed files with 2 additions and 8 deletions
Showing only changes of commit ea15e25fe2 - Show all commits

View File

@ -102,10 +102,6 @@ impl FileManager {
pub fn save(self: &Self, file: &File, kind: LookupKind) -> Result<(), Box<dyn Error>> {
let file = file.clone();
let midfix = match kind {
LookupKind::ByName => "-name-",
LookupKind::ByHash => "-hash-"
};
match kind {
LookupKind::ByName => {
@ -114,9 +110,8 @@ impl FileManager {
return Ok(self.save_int(
&file,
format!(
"{}{}{}",
"{}-name-{}",
Outdated
Review

breaks dry? see line 130 as well. not quite sure if thats a bad thing

breaks dry? see line 130 as well. not quite sure if thats a bad thing
self.env.redis.prefix,
midfix,
name
)
)?)
@ -130,9 +125,8 @@ impl FileManager {
self.save_int(
&file,
format!(
"{}{}{}",
"{}-hash-{}",
self.env.redis.prefix,
midfix,
file.hash()
)
)