Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SOF3 committed Jan 18, 2025
1 parent 92d10e6 commit a2b699f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "codegen", "framework"]

[package]
name = "portrait"
version = "0.3.0"
version = "0.3.1"
authors = ["SOFe <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -20,7 +20,7 @@ derive-delegate-filler = ["portrait-codegen/derive-delegate-filler"]
log-filler = ["portrait-codegen/log-filler"]

[dependencies]
portrait-codegen = {version = "0.3.0", path = "./codegen"}
portrait-codegen = {version = "0.3.1", path = "./codegen"}

[dev-dependencies]
either = "1.13.0"
Expand Down
4 changes: 2 additions & 2 deletions codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "portrait-codegen"
version = "0.3.0"
version = "0.3.1"
authors = ["SOFe <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -24,4 +24,4 @@ quote = "1.0.23"
rand = "0.8.5"
itertools = "0.12.1"
syn = {version = "2.0.4", features = ["full", "visit", "visit-mut"]}
portrait-framework = {version = "0.3.0", path = "../framework"}
portrait-framework = {version = "0.3.1", path = "../framework"}
6 changes: 4 additions & 2 deletions codegen/src/derive_fillers/derive_delegate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::mem;

use portrait_framework::{DeriveContext, GenerateDerive, NoArgs};
use proc_macro2::Span;
use syn::{punctuated::Punctuated, spanned::Spanned};
use syn::spanned::Spanned;

use crate::util;

Expand Down Expand Up @@ -70,7 +72,7 @@ impl GenerateDerive for Generator {

let old_stmt_block = syn::Block {
brace_token: syn::token::Brace(with_try_span),
stmts: stmts.drain(..).collect(),
stmts: mem::take(&mut stmts),
};

let wrapped_stmt = syn::Expr::Call(syn::ExprCall {
Expand Down
2 changes: 1 addition & 1 deletion framework/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "portrait-framework"
version = "0.3.0"
version = "0.3.1"
authors = ["SOFe <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//! However they come with some limitations:
//!
//! - There is no reasonable way to implement an associated function
//! if its return type is an associated type.
//! if its return type is an associated type.
//! - If a trait contains many highly similar associated functions,
//! writing the defaults involves a lot of boilerplate.
//! But users can only provide one default implementation for each method
//! through procedural macros.
//! writing the defaults involves a lot of boilerplate.
//! But users can only provide one default implementation for each method
//! through procedural macros.
//!
//! With `portrait`, the default implementations are provided
//! at `impl`-level granularity instead of trait-level.
Expand Down

0 comments on commit a2b699f

Please sign in to comment.