From dee257983095f3ae1ee50973cd812ea1d38b91bd Mon Sep 17 00:00:00 2001 From: Philip Daniels Date: Sun, 3 Apr 2022 21:47:15 +0100 Subject: [PATCH] Remove usvg from Cargo.tomls --- Cargo.lock | 2 -- lapce-data/Cargo.toml | 1 - lapce-data/src/palette.rs | 10 +--------- lapce-ui/Cargo.toml | 1 - lapce-ui/src/palette.rs | 8 -------- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95af11f6..e10b38d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1929,7 +1929,6 @@ dependencies = [ "unicode-segmentation", "unicode-width", "ureq", - "usvg", "uuid", "xi-rope", "xi-unicode", @@ -2030,7 +2029,6 @@ dependencies = [ "toml", "unicode-segmentation", "unicode-width", - "usvg", "xi-rope", "xi-unicode", ] diff --git a/lapce-data/Cargo.toml b/lapce-data/Cargo.toml index 62cfd5a5..78944fc1 100644 --- a/lapce-data/Cargo.toml +++ b/lapce-data/Cargo.toml @@ -30,7 +30,6 @@ im = { version = "15.0.0", features = ["serde"] } crossbeam-channel = "0.5.0" crossbeam-utils = "0.8.4" regex = "1.4.2" -usvg = "0.14.0" jsonrpc-lite = "0.5.0" bit-vec = "0.5.0" parking_lot = { version = "0.11.0", features = ["deadlock_detection"] } diff --git a/lapce-data/src/palette.rs b/lapce-data/src/palette.rs index fa243787..45a4c1da 100644 --- a/lapce-data/src/palette.rs +++ b/lapce-data/src/palette.rs @@ -6,7 +6,7 @@ WidgetId, }; use druid::{ - Data, Env, EventCtx, Size, + Data, Env, EventCtx, }; use fuzzy_matcher::skim::SkimMatcherV2; use fuzzy_matcher::FuzzyMatcher; @@ -17,7 +17,6 @@ use std::path::PathBuf; use std::sync::Arc; use std::cmp::Ordering; -use usvg; use uuid::Uuid; use crate::{ @@ -1008,10 +1007,3 @@ fn filter_items( items } } - -pub fn svg_tree_size(svg_tree: &usvg::Tree) -> Size { - match *svg_tree.root().borrow() { - usvg::NodeKind::Svg(svg) => Size::new(svg.size.width(), svg.size.height()), - _ => Size::ZERO, - } -} diff --git a/lapce-ui/Cargo.toml b/lapce-ui/Cargo.toml index 14eba158..3d390e66 100644 --- a/lapce-ui/Cargo.toml +++ b/lapce-ui/Cargo.toml @@ -28,7 +28,6 @@ im = { version = "15.0.0", features = ["serde"] } crossbeam-channel = "0.5.0" crossbeam-utils = "0.8.4" regex = "1.4.2" -usvg = "0.14.0" jsonrpc-lite = "0.5.0" bit-vec = "0.5.0" parking_lot = { version = "0.11.0", features = ["deadlock_detection"] } diff --git a/lapce-ui/src/palette.rs b/lapce-ui/src/palette.rs index c5c6ffbe..abf9a0af 100644 --- a/lapce-ui/src/palette.rs +++ b/lapce-ui/src/palette.rs @@ -22,7 +22,6 @@ }, }; use lsp_types::SymbolKind; -use usvg; use crate::{ editor::view::LapceEditorView, @@ -940,10 +939,3 @@ pub fn new( } } } - -pub fn svg_tree_size(svg_tree: &usvg::Tree) -> Size { - match *svg_tree.root().borrow() { - usvg::NodeKind::Svg(svg) => Size::new(svg.size.width(), svg.size.height()), - _ => Size::ZERO, - } -}