Remove unused dependencies and avoid instantiating FontCache in tests

This commit is contained in:
Antonio Scandurra
2021-03-25 10:48:32 +01:00
parent 5f3dbb05d6
commit 0906b2a2f4
7 changed files with 11 additions and 21 deletions
+3 -2
View File
@@ -5,7 +5,7 @@ use crate::{
platform::{self, App as _, WindowOptions},
presenter::Presenter,
util::post_inc,
AssetCache, AssetSource, FontCache,
AssetCache, AssetSource, FontCache, TextLayoutCache,
};
use anyhow::{anyhow, Result};
use keymap::MatchResult;
@@ -624,10 +624,11 @@ impl MutableAppContext {
) {
Err(e) => log::error!("error opening window: {}", e),
Ok(mut window) => {
let text_layout_cache = TextLayoutCache::new(self.platform.fonts());
let presenter = Rc::new(RefCell::new(Presenter::new(
window_id,
self.font_cache.clone(),
self.platform.fonts(),
text_layout_cache,
self.assets.clone(),
self,
)));