From 676719b3614f6b3d2c97105e70a436f81ebfaa7b Mon Sep 17 00:00:00 2001
From: Brian Dawn <brian-dawn@users.noreply.github.com>
Date: Sat, 5 Jun 2021 11:52:13 -0500
Subject: [PATCH] Simplify creating pathbufs.

Co-authored-by: Ivan Tham <pickfire@riseup.net>
---
 helix-core/src/syntax.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index a046a9c5..0bc6cb9d 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -87,8 +87,7 @@ struct Runtime;
 
 #[cfg(feature = "embed_runtime")]
 fn load_runtime_file(language: &str, filename: &str) -> Result<String, Box<dyn std::error::Error>> {
-    let root = PathBuf::new();
-    let path = root.join("queries").join(language).join(filename);
+    let path = PathBuf::from("queries").join(language).join(filename);
 
     let query_bytes = Runtime::get(&path.display().to_string()).unwrap_or_default();
     std::str::from_utf8(query_bytes.as_ref())