summaryrefslogtreecommitdiff
path: root/src/layout/actions.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-08-02 16:56:14 +0200
committerLaurenz <laurmaedje@gmail.com>2020-08-02 16:56:14 +0200
commitd5ff97f42ed1e682a66ea8d51e5f9ed1be547b9c (patch)
tree2fdc3a368c4320051e3f62a460f3912fe5f44c7c /src/layout/actions.rs
parent533374db14087ac54fdc86afa5f009487ac1b850 (diff)
Move binary into separate crate and tidy dependencies 🎭
Diffstat (limited to 'src/layout/actions.rs')
-rw-r--r--src/layout/actions.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/layout/actions.rs b/src/layout/actions.rs
index 89c10285..7a32a46a 100644
--- a/src/layout/actions.rs
+++ b/src/layout/actions.rs
@@ -1,9 +1,11 @@
//! Drawing and configuration actions composing layouts.
use std::fmt::{self, Debug, Formatter};
+
+#[cfg(feature = "serialize")]
use serde::ser::{Serialize, Serializer, SerializeTuple};
-use fontdock::FaceId;
+use fontdock::FaceId;
use crate::geom::Size;
use super::Layout;
use self::LayoutAction::*;
@@ -22,6 +24,7 @@ pub enum LayoutAction {
DebugBox(Size),
}
+#[cfg(feature = "serialize")]
impl Serialize for LayoutAction {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
match self {