fix buffer not clearing

This commit is contained in:
slonkazoid 2024-12-25 00:09:16 +03:00
parent 239c0a9f43
commit 4c0c0cd9f2
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM

View file

@ -115,6 +115,7 @@ impl Blag {
let blag_meta: BlagMetadata = serde_json::from_str(&buf)?;
debug!("blag meta: {blag_meta:?}");
let (meta, dont_cache, raw) = blag_meta.into_full(name);
buf.clear();
// this is morally reprehensible
if let Some(raw) = raw {
@ -124,10 +125,8 @@ impl Blag {
}
let parsed = start.elapsed();
let rendering = Instant::now();
buf.clear();
reader.read_to_string(&mut buf).await?;
let status = cmd.wait().await?;