aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmnikar2021-08-30 00:15:49 +0000
committerGitHub2021-08-30 00:15:49 +0000
commit03ad9e0bfa37222762683aeb84be2d324d166930 (patch)
treeb47cc47ecfd410436f8b8a3bba41e1109e778c6b
parent847d1fa496f157c1a9640c5cedd92d6593e33b08 (diff)
Fix code indentation (#671)
-rw-r--r--helix-term/src/ui/editor.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 72b8adc1..de0d065e 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -148,21 +148,21 @@ impl EditorView {
syntax
.highlight_iter(text.slice(..), Some(range), None, |language| {
loader
- .language_config_for_scope(&format!("source.{}", language))
- .and_then(|language_config| {
- let config = language_config.highlight_config(scopes)?;
- let config_ref = config.as_ref();
- // SAFETY: the referenced `HighlightConfiguration` behind
- // the `Arc` is guaranteed to remain valid throughout the
- // duration of the highlight.
- let config_ref = unsafe {
- std::mem::transmute::<
- _,
- &'static syntax::HighlightConfiguration,
- >(config_ref)
- };
- Some(config_ref)
- })
+ .language_config_for_scope(&format!("source.{}", language))
+ .and_then(|language_config| {
+ let config = language_config.highlight_config(scopes)?;
+ let config_ref = config.as_ref();
+ // SAFETY: the referenced `HighlightConfiguration` behind
+ // the `Arc` is guaranteed to remain valid throughout the
+ // duration of the highlight.
+ let config_ref = unsafe {
+ std::mem::transmute::<
+ _,
+ &'static syntax::HighlightConfiguration,
+ >(config_ref)
+ };
+ Some(config_ref)
+ })
})
.map(|event| event.unwrap())
.collect() // TODO: we collect here to avoid holding the lock, fix later