From 7a7da1e94663f11401b019bb1bb5d80b91808d53 Mon Sep 17 00:00:00 2001 From: Dummi26 Date: Thu, 13 Apr 2023 17:51:38 +0200 Subject: [PATCH] add \n to files that dont end in one to prevent weird errors --- mers/src/parse/file.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mers/src/parse/file.rs b/mers/src/parse/file.rs index e6ca2ec..5c7413f 100755 --- a/mers/src/parse/file.rs +++ b/mers/src/parse/file.rs @@ -75,6 +75,9 @@ impl File { None => break, } } + if !data.ends_with('\n') { + data.push('\n'); + } let chars = data.char_indices().collect(); Self { path,