diff options
author | Brian Dawn | 2021-06-05 16:52:13 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-06 01:49:17 +0000 |
commit | 676719b3614f6b3d2c97105e70a436f81ebfaa7b (patch) | |
tree | a3678783f0361f4d2bb4a67d92403b9506f9ec80 | |
parent | ae105812d6c7ec20220d78d453f614438fbc5ba4 (diff) |
Simplify creating pathbufs.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
-rw-r--r-- | helix-core/src/syntax.rs | 3 |
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()) |