diff --git a/src/designspace.rs b/src/designspace.rs index 1af6c4a3..24be8d3b 100644 --- a/src/designspace.rs +++ b/src/designspace.rs @@ -2,7 +2,7 @@ #![deny(rustdoc::broken_intra_doc_links)] -use serde::Serialize; +use serde::{Deserialize, Serialize}; use std::{fs::File, io::BufReader, path::Path}; use plist::Dictionary; diff --git a/src/font.rs b/src/font.rs index b7a3f211..fad2e338 100644 --- a/src/font.rs +++ b/src/font.rs @@ -5,6 +5,9 @@ use std::fs; use std::path::{Path, PathBuf}; +use serde::{Deserialize, Serialize}; +use serde_repr::{Deserialize_repr, Serialize_repr}; + use crate::data_request::LayerFilter; use crate::datastore::{DataStore, ImageStore}; use crate::error::{FontLoadError, FontWriteError}; diff --git a/src/fontinfo.rs b/src/fontinfo.rs index 97b18058..1ced853d 100644 --- a/src/fontinfo.rs +++ b/src/fontinfo.rs @@ -8,6 +8,7 @@ use std::{collections::HashSet, convert::TryFrom, ops::Deref}; use serde::de::Deserializer; use serde::ser::{SerializeSeq, Serializer}; use serde::{Deserialize, Serialize}; +use serde_repr::{Deserialize_repr, Serialize_repr}; use crate::error::{ExpectedPositiveValue, FontInfoErrorKind, FontInfoLoadError}; use crate::shared_types::PUBLIC_OBJECT_LIBS_KEY; diff --git a/src/glyph/codepoints.rs b/src/glyph/codepoints.rs index c994d392..e0d67a4c 100644 --- a/src/glyph/codepoints.rs +++ b/src/glyph/codepoints.rs @@ -4,6 +4,7 @@ //! however we don't want this to be part of our public API, so use a wrapper. use indexmap::IndexSet; +use serde::{Deserialize, Serialize}; /// A set of Unicode codepoints #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)] diff --git a/src/guideline.rs b/src/guideline.rs index 5ac36193..ac54a732 100644 --- a/src/guideline.rs +++ b/src/guideline.rs @@ -1,6 +1,6 @@ -use serde::de::{Deserialize, Deserializer}; -use serde::ser::{Serialize, SerializeStruct, Serializer}; -use serde::{de, ser}; +use serde::de::Deserializer; +use serde::ser::{SerializeStruct, Serializer}; +use serde::{de, ser, Deserialize, Serialize}; use crate::{Color, Identifier, Name, Plist}; diff --git a/src/layer.rs b/src/layer.rs index 6fa9b7b5..87a5cc58 100644 --- a/src/layer.rs +++ b/src/layer.rs @@ -5,6 +5,8 @@ use std::path::{Path, PathBuf}; #[cfg(feature = "rayon")] use rayon::prelude::*; +use serde::Deserialize; + use crate::data_request::LayerFilter; use crate::error::{FontLoadError, LayerLoadError, LayerWriteError, NamingError}; use crate::names::NameList; diff --git a/src/lib.rs b/src/lib.rs index 4442d6f0..56b06864 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,11 +65,6 @@ #![warn(missing_docs)] #![deny(rustdoc::broken_intra_doc_links, unsafe_code)] -#[macro_use] -extern crate serde_derive; -#[macro_use] -extern crate serde_repr; - mod data_request; pub mod datastore; pub mod designspace; diff --git a/src/name.rs b/src/name.rs index 688d4d8e..52347e62 100644 --- a/src/name.rs +++ b/src/name.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use std::sync::Arc; -use serde::{Deserialize, Deserializer}; +use serde::{Deserialize, Deserializer, Serialize}; use crate::error::NamingError; diff --git a/src/upconversion.rs b/src/upconversion.rs index 042527d6..5dd54bda 100644 --- a/src/upconversion.rs +++ b/src/upconversion.rs @@ -1,6 +1,8 @@ use std::collections::{BTreeMap, HashMap, HashSet}; use std::path::Path; +use serde::Deserialize; + use crate::error::FontLoadError; use crate::font::LIB_FILE; use crate::fontinfo::FontInfo; @@ -216,8 +218,6 @@ pub(crate) fn upconvert_ufov1_robofab_data( #[cfg(test)] mod tests { - extern crate maplit; - use super::*; use crate::{ font::{Font, FormatVersion},