Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into dp-remove-phantomdata
  • Loading branch information
dvdplm committed Dec 4, 2020
commit e4d32140cc821f242ce6960edfa48145769f356c
6 changes: 3 additions & 3 deletions derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fn generate_type(input: TokenStream2) -> Result<TokenStream2> {
let ty_ident = &ty.ident;
if !phantom_params.contains(ty_ident) {
acc.push(quote! {
_scale_info::meta_type::<#ty_ident>()
::scale_info::meta_type::<#ty_ident>()
});
}
acc
Expand Down Expand Up @@ -264,7 +264,7 @@ fn generate_composite_type(data_struct: &DataStruct) -> (TokenStream2, Vec<Ident
Fields::Unit => (quote! { unit() }, Vec::new()),
};
(
quote! { composite(_scale_info::build::Fields::#fields) },
quote! { composite(::scale_info::build::Fields::#fields) },
phantom_params,
)
}
Expand Down Expand Up @@ -356,7 +356,7 @@ fn generate_variant_type(data_enum: &DataEnum) -> (TokenStream2, Vec<Ident>) {
(
quote! {
variant(
_scale_info::build::Variants::with_fields()
::scale_info::build::Variants::with_fields()
#( #variants)*
)
},
Expand Down
2 changes: 0 additions & 2 deletions src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ use crate::prelude::{
collections::BTreeMap,
marker::PhantomData,
string::String,
vec,
vec::Vec,
};

use crate::{
build::*,
meta_type,
MetaType,
Path,
Type,
Expand Down
12 changes: 0 additions & 12 deletions test_suite/tests/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![allow(dead_code)]

#[cfg(not(feature = "std"))]
extern crate alloc;

#[cfg(not(feature = "std"))]
use alloc::{
vec,
vec::Vec,
};
use core::{
marker::PhantomData,
num::NonZeroU32,
};
use pretty_assertions::{
assert_eq,
assert_ne,
Expand Down
10 changes: 4 additions & 6 deletions test_suite/tests/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
// limitations under the License.
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
extern crate alloc;

#[cfg(not(feature = "std"))]
use alloc::boxed::Box;
use core::marker::PhantomData;
use scale_info::prelude::{
marker::PhantomData,
boxed::Box,
};

use pretty_assertions::assert_eq;
use scale_info::{
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.