summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Eades <danieleades@hotmail.com>2021-12-27 10:59:45 +0000
committerDaniel Eades <danieleades@hotmail.com>2021-12-28 18:30:50 +0000
commit198f9ece1cc6de1f6f52b49ed76e7736cbb51408 (patch)
treec3cbd2ed7a70fd2a57ebd8014b8ad746bb744114
parent9aa13c6c8ac28b4e2b5c7bf3bcdb32563d802b35 (diff)
use explicit imports for macros
-rw-r--r--src/de.rs6
-rw-r--r--src/file/format/mod.rs1
-rw-r--r--src/lib.rs2
-rw-r--r--src/ser.rs1
4 files changed, 5 insertions, 5 deletions
diff --git a/src/de.rs b/src/de.rs
index 8a178a6..dcc1db8 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -138,7 +138,7 @@ impl<'de> de::Deserializer<'de> for Value {
})
}
- forward_to_deserialize_any! {
+ serde::forward_to_deserialize_any! {
char seq
bytes byte_buf map struct unit
identifier ignored_any unit_struct tuple_struct tuple
@@ -155,7 +155,7 @@ impl<'de, 'a> de::Deserializer<'de> for StrDeserializer<'a> {
visitor.visit_str(self.0)
}
- forward_to_deserialize_any! {
+ serde::forward_to_deserialize_any! {
bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string seq
bytes byte_buf map struct unit enum newtype_struct
identifier ignored_any unit_struct tuple_struct tuple option
@@ -460,7 +460,7 @@ impl<'de> de::Deserializer<'de> for Config {
})
}
- forward_to_deserialize_any! {
+ serde::forward_to_deserialize_any! {
char seq
bytes byte_buf map struct unit newtype_struct
identifier ignored_any unit_struct tuple_struct tuple
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs
index d8817f2..3c18e3c 100644
--- a/src/file/format/mod.rs
+++ b/src/file/format/mod.rs
@@ -2,6 +2,7 @@
// BUG: ? For some reason this doesn't do anything if I try and function scope this
#![allow(unused_mut)]
+use lazy_static::lazy_static;
use std::collections::HashMap;
use std::error::Error;
diff --git a/src/lib.rs b/src/lib.rs
index a1e4e99..8fa3cdb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,7 +21,6 @@
#![allow(unknown_lints)]
// #![warn(missing_docs)]
-#[macro_use]
extern crate serde;
#[cfg(test)]
@@ -29,7 +28,6 @@ extern crate serde_derive;
extern crate nom;
-#[macro_use]
extern crate lazy_static;
#[cfg(feature = "toml")]
diff --git a/src/ser.rs b/src/ser.rs
index eef055a..128446c 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -698,6 +698,7 @@ impl ser::SerializeStructVariant for StringKeySerializer {
#[cfg(test)]
mod test {
use super::*;
+ use serde::{Deserialize, Serialize};
#[test]
fn test_struct() {