Skip to content

Commit

Permalink
remove external private modules (#605)
Browse files Browse the repository at this point in the history
Co-authored-by: Austin Abell <austinabell8@gmail.com>
  • Loading branch information
freddy and austinabell authored Oct 13, 2021
1 parent 47d46a5 commit 03487c1
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion near-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ proc-macro = true

[dependencies]
proc-macro2 = "1.0"
syn = {version = "=1.0.57", features = ["full", "fold", "extra-traits", "visit"] }
syn = {version = "1", features = ["full", "fold", "extra-traits", "visit"] }
quote = "1.0"
Inflector = { version = "0.11.4", default-features = false, features = [] }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use syn::export::TokenStream2;
use proc_macro2::TokenStream as TokenStream2;

use crate::core_impl::info_extractor::{
ArgInfo, AttrSigInfo, BindgenArgType, InputStructType, SerializerType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::core_impl::info_extractor::{
AttrSigInfo, ImplItemMethodInfo, InputStructType, MethodType, SerializerType,
};
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::export::TokenStream2;
use syn::{ReturnType, Signature};

impl ImplItemMethodInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::ItemImplInfo;
use syn::export::TokenStream2;
use proc_macro2::TokenStream as TokenStream2;
use syn::Ident;

impl ItemImplInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::core_impl::info_extractor::ItemTraitInfo;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::export::TokenStream2;

impl ItemTraitInfo {
/// Generate code that wrapps external calls.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use crate::core_impl::{
info_extractor::{InputStructType, SerializerType, TraitItemMethodInfo},
AttrSigInfo,
};
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::export::TokenStream2;

impl TraitItemMethodInfo {
/// Generate code that wraps the method.
Expand Down
2 changes: 1 addition & 1 deletion near-sdk-macros/src/core_impl/info_extractor/arg_info.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::core_impl::info_extractor::serializer_attr::SerializerAttr;
use crate::core_impl::info_extractor::SerializerType;
use proc_macro2::Span;
use quote::ToTokens;
use syn::export::Span;
use syn::{Attribute, Error, Ident, Pat, PatType, Token, Type};

pub enum BindgenArgType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{ArgInfo, BindgenArgType, InitAttr, MethodType, SerializerAttr, SerializerType};
use proc_macro2::Span;
use quote::ToTokens;
use syn::export::Span;
use syn::spanned::Spanned;
use syn::{Attribute, Error, FnArg, Ident, Receiver, ReturnType, Signature};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::TraitItemMethodInfo;
use inflector::Inflector;
use syn::export::Span;
use proc_macro2::Span;
use syn::spanned::Spanned;
use syn::{Error, Ident, ItemTrait, TraitItem};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::AttrSigInfo;
use syn::export::Span;
use proc_macro2::Span;
use syn::spanned::Spanned;
use syn::{Error, LitStr, TraitItemMethod};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{BindgenArgType, ImplItemMethodInfo, InputStructType, MethodType, SerializerType};

use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::export::TokenStream2;
use syn::ReturnType;

impl ImplItemMethodInfo {
Expand Down
4 changes: 2 additions & 2 deletions near-sdk-macros/src/core_impl/metadata/metadata_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//! For this we implement the visitor.
use crate::ItemImplInfo;

use quote::quote;
use syn::export::{ToTokens, TokenStream2};
use proc_macro2::TokenStream as TokenStream2;
use quote::{quote, ToTokens};
use syn::visit::Visit;
use syn::{Error, ItemImpl};

Expand Down
2 changes: 1 addition & 1 deletion near-sdk-sim/src/outcome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use near_primitives::transaction::ExecutionStatus::{SuccessReceiptId, SuccessVal
use near_primitives::types::AccountId;
use near_sdk::borsh::BorshDeserialize;
use near_sdk::serde::de::DeserializeOwned;
use near_sdk::serde::export::Formatter;
use near_sdk::serde_json::Value;
use near_sdk::Gas;
use std::borrow::Borrow;
use std::cell::RefCell;
use std::fmt::Debug;
use std::fmt::Formatter;
use std::rc::Rc;

pub type TxResult = Result<ExecutionOutcome, ExecutionOutcome>;
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/collections/legacy_tree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@ mod tests {
extern crate rand;
use self::rand::RngCore;
use quickcheck::QuickCheck;
use serde::export::Formatter;
use std::collections::BTreeMap;
use std::collections::HashSet;
use std::fmt::Formatter;
use std::fmt::{Debug, Result};

/// Return height of the tree - number of nodes on the longest path starting from the root node.
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/collections/tree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,9 @@ mod tests {
extern crate rand;
use self::rand::RngCore;
use quickcheck::QuickCheck;
use serde::export::Formatter;
use std::collections::BTreeMap;
use std::collections::HashSet;
use std::fmt::Formatter;
use std::fmt::{Debug, Result};

/// Return height of the tree - number of nodes on the longest path starting from the root node.
Expand Down

0 comments on commit 03487c1

Please sign in to comment.