summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-06-05 19:15:06 +0300
committerA Farzat <a@farzat.xyz>2026-06-05 19:21:23 +0300
commit8b2e20632aba0686fb82ef40d7fa78169d4f2901 (patch)
tree92f27adfe2457cd5b21306a16ac248907c0bebe8 /src/main.rs
parent004ad2f178748b1a79a4d55b8784654f561b6cd4 (diff)
downloadrepo2markdown-8b2e20632aba0686fb82ef40d7fa78169d4f2901.tar.gz
repo2markdown-8b2e20632aba0686fb82ef40d7fa78169d4f2901.zip
Make main.rs use render_path
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 1468073..4d52ca3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,6 @@
use std::{
env,
ffi::OsStr,
- fs::File,
io::{self, Read, Write},
os::unix::ffi::OsStrExt,
path::Path,
@@ -69,8 +68,7 @@ pub fn run<R: Read, W: Write>(
let path = Path::new(OsStr::from_bytes(segment));
let normalized_path = normalizer.normalize(path)?;
- let file = File::open(normalized_path.absolute)?;
- renderer.render_file(&normalized_path.relative, file)?;
+ renderer.render_path(&normalized_path)?;
}
Ok(())
}