Skip to content

Commit

Permalink
Reformat exports
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen committed Jan 7, 2025
1 parent 9d85f41 commit 5c35a67
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions crates/cgp-async-macro/src/strip_async.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use proc_macro2::{Group, TokenStream, TokenTree};
use syn::parse::{Parse, ParseStream};
use syn::token::{Async, Await, Dot, Fn};
Expand Down
4 changes: 1 addition & 3 deletions crates/cgp-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

pub mod traits;

pub use traits::{Async, MaybeSend, MaybeStatic, MaybeSync};

#[cfg(feature = "async")]
pub use cgp_async_macro::native_async as async_trait;

#[cfg(not(feature = "async"))]
pub use cgp_sync::async_trait;
pub use traits::{Async, MaybeSend, MaybeStatic, MaybeSync};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use alloc::boxed::Box;
use alloc::vec;
use alloc::vec::Vec;

use syn::{parse_quote, Generics, ImplItem, ImplItemType, ItemImpl, Path, Type};

use crate::delegate_components::ast::{ComponentAst, DelegateEntriesAst};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::format;

use proc_macro2::Span;
use quote::ToTokens;
use syn::parse::{Parse, ParseStream};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::boxed::Box;
use alloc::vec::Vec;

use syn::punctuated::Punctuated;
use syn::token::{Brace, Comma, For, Impl, Plus};
use syn::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use proc_macro2::TokenStream;
use quote::quote;
use syn::{parse_quote, ImplItemFn, Signature, TypePath, Visibility};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::boxed::Box;
use alloc::vec::Vec;

use proc_macro2::Span;
use syn::punctuated::Punctuated;
use syn::token::{Brace, Comma, For, Impl, Plus};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use syn::punctuated::Punctuated;
use syn::{parse_quote, Ident, ItemTrait, TraitItem};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use itertools::Itertools;
use proc_macro2::{Group, Ident, TokenStream, TokenTree};
use quote::{format_ident, ToTokens};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::string::{String, ToString};

use proc_macro2::Span;
use syn::Ident;

Expand Down
1 change: 1 addition & 0 deletions crates/cgp-component-macro-lib/src/for_each_replace.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use proc_macro2::{Group, TokenStream, TokenTree};
use quote::{quote, ToTokens};
use syn::__private::parse_brackets;
Expand Down
1 change: 1 addition & 0 deletions crates/cgp-component-macro-lib/src/preset/define_preset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::format;
use alloc::string::ToString;

use proc_macro2::{Span, TokenStream};
use quote::ToTokens;
use syn::{parse_quote, Ident, ItemTrait};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::vec::Vec;

use syn::{parse_quote, Generics, Ident, ItemImpl, Type};

use crate::delegate_components::ast::{ComponentAst, DelegateEntriesAst};
Expand Down
1 change: 1 addition & 0 deletions crates/cgp-component-macro-lib/src/tests/helper/format.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::string::{String, ToString};

use prettyplease::unparse;
use proc_macro2::TokenStream;
use syn::parse_file;
Expand Down
3 changes: 1 addition & 2 deletions crates/cgp-error-extra/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ extern crate alloc;

mod impls;

pub use impls::{DiscardDetail, PanicOnError, RaiseFrom, RaiseInfallible, ReturnError};

#[cfg(feature = "alloc")]
pub use impls::{DebugError, DisplayError};
pub use impls::{DiscardDetail, PanicOnError, RaiseFrom, RaiseInfallible, ReturnError};
4 changes: 2 additions & 2 deletions crates/cgp-error-std/src/impls/debug_error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::fmt::Debug;

use alloc::boxed::Box;
use alloc::format;
use core::fmt::Debug;

use cgp_core::error::{ErrorRaiser, HasErrorType};

use crate::types::{Error, StringError};
Expand Down
4 changes: 2 additions & 2 deletions crates/cgp-error-std/src/impls/display_error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::fmt::Display;

use alloc::boxed::Box;
use alloc::format;
use core::fmt::Display;

use cgp_core::error::{ErrorRaiser, HasErrorType};

use crate::types::{Error, StringError};
Expand Down
3 changes: 1 addition & 2 deletions crates/cgp-error-std/src/types/string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use alloc::string::String;
use core::error::Error;
use core::fmt::{Debug, Display};

use alloc::string::String;

pub struct StringError {
pub message: String,
}
Expand Down
5 changes: 1 addition & 4 deletions crates/cgp-extra/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#![no_std]

pub use cgp_error_extra as error;
pub use cgp_inner as inner;
pub use cgp_run as run;
pub use cgp_runtime as runtime;
pub use {cgp_error_extra as error, cgp_inner as inner, cgp_run as run, cgp_runtime as runtime};
1 change: 1 addition & 0 deletions crates/cgp-field-macro-lib/src/field.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::string::ToString;
use alloc::vec::Vec;

use proc_macro2::TokenStream;
use quote::ToTokens;
use syn::{parse_quote, Fields, ItemImpl, ItemStruct};
Expand Down
1 change: 1 addition & 0 deletions crates/cgp-field-macro-lib/src/tests/helper/format.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::string::{String, ToString};

use prettyplease::unparse;
use proc_macro2::TokenStream;
use syn::parse_file;
Expand Down
1 change: 1 addition & 0 deletions crates/cgp-field-macro-lib/src/tests/product.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use alloc::string::ToString;

use quote::quote;

use crate::product::{make_product_expr, make_product_type, make_sum_type};
Expand Down
3 changes: 1 addition & 2 deletions crates/cgp-field/src/impls/use_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use core::marker::PhantomData;
use cgp_component::WithProvider;
use cgp_type::ProvideType;

use crate::traits::{FieldGetter, HasField};
use crate::traits::{HasFieldMut, MutFieldGetter};
use crate::traits::{FieldGetter, HasField, HasFieldMut, MutFieldGetter};

pub struct UseField<Tag>(pub PhantomData<Tag>);

Expand Down

0 comments on commit 5c35a67

Please sign in to comment.