Skip to content

Commit

Permalink
reduce required deps
Browse files Browse the repository at this point in the history
- move env_logger to dev-dependencies
- move image functions behind feature flag
  • Loading branch information
HookedBehemoth committed Jan 2, 2024
1 parent f0d6240 commit b326b4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libremarkable"
version = "0.6.2"
version = "0.7.0"
authors = ["Can Selcik <contact@cselcik.com>"]
repository = "https://github.com/canselcik/libremarkable"
license = "MIT"
Expand All @@ -11,7 +11,6 @@ edition = "2021"

[dependencies]
log = "0.4.14"
env_logger = "0.10.0"
once_cell = "1.9.0"
atomic = "0.5.1"
cgmath = "0.18.0"
Expand Down Expand Up @@ -54,7 +53,7 @@ framebuffer-text-drawing = ["framebuffer-drawing", "rusttype"]
input-types = []
input = ["scan", "input-types", "evdev", "epoll", "fxhash"]
battery = []
appctx = ["framebuffer-text-drawing", "image", "input", "aabb-quadtree"]
appctx = ["framebuffer-text-drawing", "input", "aabb-quadtree"]

enable-runtime-benchmarking = ["stopwatch"]

Expand Down Expand Up @@ -82,6 +81,7 @@ path = "examples/live.rs"
crate-type = ["bin"]

[dev-dependencies]
env_logger = "0.10.0"
# For spy
redhook = "2.0.0"
libc = "0.2.69"
Expand Down
1 change: 1 addition & 0 deletions src/appctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ impl<'a> ApplicationContext<'a> {
draw_area
}

#[cfg(feature = "image")]
pub fn display_image(
&mut self,
img: &image::DynamicImage,
Expand Down
2 changes: 2 additions & 0 deletions src/ui_extensions/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ pub enum UIElement {
foreground: color,
border_px: u32,
},
#[cfg(feature = "image")]
Image {
img: image::DynamicImage,
},
Expand Down Expand Up @@ -158,6 +159,7 @@ impl UIElementWrapper {
text,
refresh,
),
#[cfg(feature = "image")]
UIElement::Image { ref img } => {
app.display_image(img, self.position.cast().unwrap(), refresh)
}
Expand Down

0 comments on commit b326b4d

Please sign in to comment.