Skip to content

Commit 7088b4c

Browse files
committed
feat: padding code file
1 parent b08a5c0 commit 7088b4c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/cache/models.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ impl Problem {
4949

5050
res + "\n"
5151
}
52+
53+
pub fn get_fid(&self) -> String {
54+
format!("{:0>4}", self.fid)
55+
}
5256
}
5357

5458
static DONE: &str = " ✔";

src/helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ mod file {
215215
suffix(&lang)?,
216216
);
217217

218-
path = path.replace("${fid}", &problem.fid.to_string());
218+
path = path.replace("${fid}", &problem.get_fid());
219219
path = path.replace("${slug}", &problem.slug.to_string());
220220

221221
Ok(path)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy