aboutsummaryrefslogtreecommitdiff
path: root/lib/xesite_markdown/src/lib.rs
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-11-06 15:15:53 -0500
committerXe Iaso <me@christine.website>2022-11-06 15:20:25 -0500
commit7a8123435b381db82b557d630bdae5df77b86608 (patch)
tree44b2197c850a24921a0d508661359716e440cf2e /lib/xesite_markdown/src/lib.rs
parent434747f4bc342ddee75aaf0cc3a39a6543474e5f (diff)
downloadxesite-7a8123435b381db82b557d630bdae5df77b86608.tar.xz
xesite-7a8123435b381db82b557d630bdae5df77b86608.zip
Xess 2.0: HSL
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'lib/xesite_markdown/src/lib.rs')
-rw-r--r--lib/xesite_markdown/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/xesite_markdown/src/lib.rs b/lib/xesite_markdown/src/lib.rs
index 5bd6dfa..941761d 100644
--- a/lib/xesite_markdown/src/lib.rs
+++ b/lib/xesite_markdown/src/lib.rs
@@ -196,9 +196,9 @@ pub fn render(inp: &str) -> Result<String> {
toot_url = format!("{toot_url}.json");
}
- let toot_fname = format!("./data/toots/{}.json", hash_string(toot_url));
+ let toot_fname = format!("./data/toots/{}.json", hash_string(toot_url.clone()));
tracing::debug!("opening {toot_fname}");
- let mut fin = fs::File::open(&toot_fname)?;
+ let mut fin = fs::File::open(&toot_fname).context(toot_url)?;
let t: Toot = from_reader(&mut fin)?;
let user_fname = format!(
@@ -206,7 +206,7 @@ pub fn render(inp: &str) -> Result<String> {
hash_string(format!("{}.json", t.attributed_to.clone()))
);
tracing::debug!("opening {user_fname}");
- let mut fin = fs::File::open(&user_fname)?;
+ let mut fin = fs::File::open(&user_fname).context(t.attributed_to.clone())?;
let u: User = from_reader(&mut fin)?;