From b67f1ef85422495418dcbf76d9160bfcb7222fb3 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 25 Aug 2026 11:16:59 -0600 Subject: [PATCH] refactor: pulled out some imports to clean up the MCP render module a bit --- src/mcp/render.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mcp/render.rs b/src/mcp/render.rs index 17a8dab..6c1da0c 100644 --- a/src/mcp/render.rs +++ b/src/mcp/render.rs @@ -13,6 +13,7 @@ use std::io::{ErrorKind, Read, Write}; #[cfg(unix)] use std::os::unix::fs::OpenOptionsExt; use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::time::SystemTime; use std::{fmt, io}; @@ -186,12 +187,11 @@ pub fn render_blob_at( // file at the final path is always complete and the dedup check below is // race-safe across processes (same sha means same content). if !path.exists() { - static TEMP_COUNTER: std::sync::atomic::AtomicUsize = - std::sync::atomic::AtomicUsize::new(0); + static TEMP_COUNTER: AtomicUsize = AtomicUsize::new(0); let temp = dir.join(format!( "{sha256}.tmp-{}-{}", std::process::id(), - TEMP_COUNTER.fetch_add(1, std::sync::atomic::Ordering::Relaxed) + TEMP_COUNTER.fetch_add(1, Ordering::Relaxed) )); let mut options = OpenOptions::new(); options.write(true).create_new(true);