Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usages of extern crate syntax. #351

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/designspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions src/fontinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/glyph/codepoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions src/guideline.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 2 additions & 0 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/upconversion.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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},
Expand Down