Skip to content

Commit

Permalink
Merge pull request #351 from waywardmonkeys/remove-extern-crate-usages
Browse files Browse the repository at this point in the history
Remove usages of `extern crate` syntax.
  • Loading branch information
RickyDaMa authored Jul 22, 2024
2 parents ecfe188 + 9f0f512 commit 22156ea
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
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

0 comments on commit 22156ea

Please sign in to comment.