Skip to content

Commit

Permalink
chore: Use use abc to replace extern crate abc
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Sep 24, 2024
1 parent c5acf1a commit f4cd364
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions avro/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use crate::{
util::{zig_i32, zig_i64},
AvroResult, Error,
};
use log::error;
use std::{borrow::Borrow, collections::HashMap};

/// Encode a `Value` into avro format.
Expand Down
3 changes: 0 additions & 3 deletions avro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,6 @@ pub use writer::{
#[cfg(feature = "derive")]
pub use apache_avro_derive::*;

#[macro_use]
extern crate log;

/// A convenience type alias for `Result`s with `Error`s.
pub type AvroResult<T> = Result<T, Error>;

Expand Down
1 change: 1 addition & 0 deletions avro/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use crate::{
types::Value,
util, AvroResult, Codec, Error,
};
use log::warn;
use serde::de::DeserializeOwned;
use serde_json::from_slice;
use std::{
Expand Down
1 change: 1 addition & 0 deletions avro/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use crate::{
AvroResult,
};
use digest::Digest;
use log::{debug, error, warn};
use serde::{
ser::{SerializeMap, SerializeSeq},
Deserialize, Serialize, Serializer,
Expand Down
1 change: 1 addition & 0 deletions avro/src/schema_equality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use crate::{
},
Schema,
};
use log::{debug, error};
use std::{fmt::Debug, sync::OnceLock};

/// A trait that compares two schemata for equality.
Expand Down
1 change: 1 addition & 0 deletions avro/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use crate::{
AvroResult, Error,
};
use bigdecimal::BigDecimal;
use log::{debug, error};
use serde_json::{Number, Value as JsonValue};
use std::{
borrow::Borrow,
Expand Down
1 change: 1 addition & 0 deletions avro/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

use crate::{schema::Namespace, AvroResult, Error};
use log::debug;
use regex_lite::Regex;
use std::sync::OnceLock;

Expand Down
6 changes: 2 additions & 4 deletions avro_derive/tests/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ use apache_avro::{
};
use apache_avro_derive::*;
use proptest::prelude::*;
use serde::{de::DeserializeOwned, ser::Serialize};
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

#[macro_use]
extern crate serde;

#[cfg(test)]
mod test_derive {
use apache_avro::schema::{Alias, EnumSchema, RecordSchema};
Expand Down
2 changes: 0 additions & 2 deletions wasm-demo/tests/demos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#![cfg(target_arch = "wasm32")]

extern crate wasm_bindgen_test;

use std::io::BufWriter;
use wasm_bindgen_test::*;

Expand Down

0 comments on commit f4cd364

Please sign in to comment.