aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBrian Dawn2021-06-05 16:52:13 +0000
committerBlaž Hrastnik2021-06-06 01:49:17 +0000
commit676719b3614f6b3d2c97105e70a436f81ebfaa7b (patch)
treea3678783f0361f4d2bb4a67d92403b9506f9ec80 /helix-core
parentae105812d6c7ec20220d78d453f614438fbc5ba4 (diff)
Simplify creating pathbufs.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs3
1 files changed, 1 insertions, 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())