@@ -148,21 +148,21 @@ impl EditorView {
149 .highlight_iter(text.slice(..), Some(range), None, |language| {
149 .highlight_iter(text.slice(..), Some(range), None, |language| {
151− .language_config_for_scope(&format!("source.{}", language))
151+ .language_config_for_scope(&format!("source.{}", language))
152− .and_then(|language_config| {
152+ .and_then(|language_config| {
153− let config = language_config.highlight_config(scopes)?;
153+ let config = language_config.highlight_config(scopes)?;
154− let config_ref = config.as_ref();
154+ let config_ref = config.as_ref();
155− // SAFETY: the referenced `HighlightConfiguration` behind
155+ // SAFETY: the referenced `HighlightConfiguration` behind
156− // the `Arc` is guaranteed to remain valid throughout the
156+ // the `Arc` is guaranteed to remain valid throughout the
157− // duration of the highlight.
157+ // duration of the highlight.
158− let config_ref = unsafe {
158+ let config_ref = unsafe {
159− std::mem::transmute::<
159+ std::mem::transmute::<
161− &'static syntax::HighlightConfiguration,
161+ &'static syntax::HighlightConfiguration,
162− >(config_ref)
162+ >(config_ref)
164− Some(config_ref)
164+ Some(config_ref)
167 .map(|event| event.unwrap())
167 .map(|event| event.unwrap())
168 .collect() // TODO: we collect here to avoid holding the lock, fix later
168 .collect() // TODO: we collect here to avoid holding the lock, fix later