Skip to content

Releases: BrynCooke/buildstructor

Release 0.5.4

29 Aug 15:24
Compare
Choose a tag to compare
Release 0.5.4

release-0.5.3

21 Jun 09:03
Compare
Choose a tag to compare
Release 0.5.3

release-0.5.2

19 Mar 19:11
Compare
Choose a tag to compare

#103 Add docs to generated new when using #[derive(Builder].

0.5.1

07 Nov 14:48
2a8bec4
Compare
Choose a tag to compare

#96 Fix associated type parameters:

#[buildstructor]
impl<T: MyTrait> Foo<T> {
    #[builder]
    pub fn new(foo: T, bar: T::Bar) -> Foo<T> {
        Foo { foo, bar }
    }
}

0.5.0

04 Aug 22:18
Compare
Choose a tag to compare

#81 Fix derive builder when used with module level visibility.

#77 Remove validation of visibility specifier.

#74 Automatically add #[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] to functions annotated with #[builder].

0.4.1

31 Jul 18:57
Compare
Choose a tag to compare

Fix README.md

0.4.0

31 Jul 18:33
beddb2b
Compare
Choose a tag to compare

#69 Add the ability to override the visibility of generated builder.

#[derive(buildstructor::Builder)]
pub struct MyStruct {
    simple: usize,
}

The generated constructor will have private visibility and the builder will be public.

#70 Add the ability to override the visibility of generated builder.

#3 Changed the storage of required but not yet supplied values to use MaybeUninit.
The tuple that represents the builder state stays the same memory layout regardless of if a field has been initialized or not.

This does not require any unsafe code!

0.3.2

09 Jun 18:16
14f4677
Compare
Choose a tag to compare

#55 Fix impl with concrete types in generics where self is used in the return type.

#[buildstructor]
impl Foo<usize> {
    #[builder]
    fn bound_new(simple: usize) -> Self {
        Self { simple }
    }
}

Previously the generated builder method was not including concrete generic type. In this case usize.

0.3.1

09 Jun 16:49
7417bf6
Compare
Choose a tag to compare

#55 Fix impl with concrete types in generics.

#[buildstructor]
impl Foo<usize> {
    #[builder]
    fn bound_new(simple: usize) -> Foo<usize> {
        Self { simple }
    }
}

Previously the generated builder method was not including concrete generic type. In this case usize.

0.3.0

23 May 20:17
63f869e
Compare
Choose a tag to compare

#55 Lifetimes are supported now.

#52 Add docs to generated builder. In addition, a type alias is introduced for the initial builder type so that:

  • the docs looks nice
  • the builder can be passed to a function (although this is of limited real world use).

#4 Use #[inline(always)] on generated code.