-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Slight refactoring in cgp-field * Move cgp_error::impls to new cgp_error_extra crate * Add feature flags for alloc in cgp-error-extra * Reorganize exports and make them explicit * Add changelog * Reformat exports
- Loading branch information
1 parent
3dc5190
commit 454a34b
Showing
69 changed files
with
214 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/delegate_components/impl_delegate.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/component_spec.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}; | ||
|
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/consumer_impl.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/delegate_fn.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/provider_impl.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/provider_trait.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}; | ||
|
||
|
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/replace_self_type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/cgp-component-macro-lib/src/derive_component/snake_case.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pub mod delegate_component; | ||
pub mod has_components; | ||
mod delegate_component; | ||
mod has_components; | ||
|
||
pub use delegate_component::DelegateComponent; | ||
pub use has_components::HasComponents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
pub mod debug_error; | ||
pub mod display_error; | ||
pub mod raise_anyhow_error; | ||
pub mod use_anyhow_error; | ||
mod debug_error; | ||
mod display_error; | ||
mod raise_anyhow_error; | ||
mod use_anyhow_error; | ||
|
||
pub use debug_error::*; | ||
pub use display_error::*; | ||
pub use raise_anyhow_error::*; | ||
pub use use_anyhow_error::*; | ||
pub use debug_error::DebugAnyhowError; | ||
pub use display_error::DisplayAnyhowError; | ||
pub use raise_anyhow_error::RaiseAnyhowError; | ||
pub use use_anyhow_error::UseAnyhowError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#![no_std] | ||
|
||
pub mod impls; | ||
mod impls; | ||
|
||
pub use impls::*; | ||
pub use impls::{DebugAnyhowError, DisplayAnyhowError, RaiseAnyhowError, UseAnyhowError}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "cgp-error-extra" | ||
version = "0.2.0" | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
authors = { workspace = true } | ||
rust-version = { workspace = true } | ||
keywords = { workspace = true } | ||
description = """ | ||
Context-generic programming error components | ||
""" | ||
|
||
[features] | ||
default = [ "alloc" ] | ||
alloc = [] | ||
|
||
[dependencies] | ||
cgp-error = { version = "0.2.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod debug_error; | ||
mod display_error; | ||
|
||
pub use debug_error::DebugError; | ||
pub use display_error::DisplayError; |
2 changes: 1 addition & 1 deletion
2
crates/cgp-error/src/impls/discard_detail.rs → ...p-error-extra/src/impls/discard_detail.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/cgp-error/src/impls/infallible.rs → ...s/cgp-error-extra/src/impls/infallible.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#[cfg(feature = "alloc")] | ||
mod alloc; | ||
|
||
mod discard_detail; | ||
mod infallible; | ||
mod panic_error; | ||
mod raise_from; | ||
mod return_error; | ||
|
||
#[cfg(feature = "alloc")] | ||
pub use alloc::{DebugError, DisplayError}; | ||
|
||
pub use discard_detail::DiscardDetail; | ||
pub use infallible::RaiseInfallible; | ||
pub use panic_error::PanicOnError; | ||
pub use raise_from::RaiseFrom; | ||
pub use return_error::ReturnError; |
2 changes: 1 addition & 1 deletion
2
crates/cgp-error/src/impls/panic_error.rs → .../cgp-error-extra/src/impls/panic_error.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/cgp-error/src/impls/raise_from.rs → ...s/cgp-error-extra/src/impls/raise_from.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/cgp-error/src/impls/return_error.rs → ...cgp-error-extra/src/impls/return_error.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#![no_std] | ||
|
||
#[cfg(feature = "alloc")] | ||
extern crate alloc; | ||
|
||
mod impls; | ||
|
||
#[cfg(feature = "alloc")] | ||
pub use impls::{DebugError, DisplayError}; | ||
pub use impls::{DiscardDetail, PanicOnError, RaiseFrom, RaiseInfallible, ReturnError}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
pub mod debug_error; | ||
pub mod display_error; | ||
pub mod raise_eyre_error; | ||
pub mod use_eyre_error; | ||
mod debug_error; | ||
mod display_error; | ||
mod raise_eyre_error; | ||
mod use_eyre_error; | ||
|
||
pub use debug_error::*; | ||
pub use display_error::*; | ||
pub use raise_eyre_error::*; | ||
pub use use_eyre_error::*; | ||
pub use debug_error::DebugEyreError; | ||
pub use display_error::DisplayEyreError; | ||
pub use raise_eyre_error::RaiseEyreError; | ||
pub use use_eyre_error::UseEyreError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#![no_std] | ||
|
||
pub mod impls; | ||
mod impls; | ||
|
||
pub use impls::*; | ||
pub use impls::{DebugEyreError, DisplayEyreError, RaiseEyreError, UseEyreError}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
pub mod debug_error; | ||
pub mod display_error; | ||
pub mod raise_boxed; | ||
pub mod use_boxed; | ||
mod debug_error; | ||
mod display_error; | ||
mod raise_boxed; | ||
mod use_boxed; | ||
|
||
pub use debug_error::*; | ||
pub use display_error::*; | ||
pub use raise_boxed::*; | ||
pub use use_boxed::*; | ||
pub use debug_error::DebugBoxedStdError; | ||
pub use display_error::DisplayBoxedStdError; | ||
pub use raise_boxed::RaiseBoxedStdError; | ||
pub use use_boxed::UseBoxedStdError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.