From fedc6e55c4fe83ddb3b607c9b424ae99ea55eb9a Mon Sep 17 00:00:00 2001 From: tinger Date: Fri, 31 Oct 2025 19:20:31 +0000 Subject: [PATCH] core: Use `read_to_sting` Simplifies the code and we don't expect the file to contain any non-UTF8 code points anyway. --- src/main.rs | 5 ++--- 1 file(s) changed, 2 insertion(s)(+), 3 deletion(s)(-) diff --git a/src/main.rs b/src/main.rs --- a/src/main.rs +++ b/src/main.rs @@ -87,10 +87,9 @@ // read temp file let mut after = vec![]; - let buffer = std::fs::read(file.path())?; - for line in buffer.lines() { - let line = line?; + let buffer = std::fs::read_to_string(file.path())?; + for line in buffer.lines() { if line.is_empty() || line.starts_with("//") { continue; } -- tangled.sh