From 6bbe14c500ade788d1eeb0b66794f00905954999 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:30:29 +0200 Subject: [PATCH 1/3] Bump actions/checkout from 3 to 4 (#71) * Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Fixed clippy warning --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Victor Koenders --- .github/workflows/rust.yml | 10 +++++----- .github/workflows/security.yml | 2 +- src/parse/generics.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e815c7a..3165d43 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,7 +32,7 @@ }, "steps": [ { - "uses": "actions/checkout@v3", + "uses": "actions/checkout@v4", "name": "Checkout" }, { @@ -75,7 +75,7 @@ }, "steps": [ { - "uses": "actions/checkout@v3", + "uses": "actions/checkout@v4", "name": "Checkout" }, { @@ -109,7 +109,7 @@ }, "steps": [ { - "uses": "actions/checkout@v3", + "uses": "actions/checkout@v4", "name": "Checkout" }, { @@ -135,7 +135,7 @@ "runs-on": "ubuntu-latest", "steps": [ { - "uses": "actions/checkout@v3", + "uses": "actions/checkout@v4", "name": "Checkout" }, { @@ -171,7 +171,7 @@ "runs-on": "ubuntu-latest", "steps": [ { - "uses": "actions/checkout@v3", + "uses": "actions/checkout@v4", "name": "Checkout" }, { diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index e3cfecf..ca93a54 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -12,7 +12,7 @@ "runs-on": "ubuntu-latest", "steps": [ { - "uses": "actions/checkout@v3" + "uses": "actions/checkout@v4" }, { "uses": "actions-rs/audit-check@v1", diff --git a/src/parse/generics.rs b/src/parse/generics.rs index 036c057..6cb9bb8 100644 --- a/src/parse/generics.rs +++ b/src/parse/generics.rs @@ -554,7 +554,7 @@ impl GenericConstraints { builder.ident(generic.ident.clone()); builder.punct(':'); builder.push_parsed(constraint)?; - self.constraints.extend(builder.stream.into_iter()); + self.constraints.extend(builder.stream); Ok(()) } @@ -575,7 +575,7 @@ impl GenericConstraints { builder.punct(','); } builder.push_parsed(constraint)?; - self.constraints.extend(builder.stream.into_iter()); + self.constraints.extend(builder.stream); Ok(()) } From e075a75a09f9b1770529bc1dda5ff529fd1a1f6b Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Tue, 17 Oct 2023 17:31:45 +0300 Subject: [PATCH 2/3] Fix wrong delimiter around attributes (#72) --- src/generate/generate_item.rs | 4 ++-- src/generate/impl.rs | 2 +- src/generate/impl_for.rs | 2 +- test/derive/src/lib.rs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/generate/generate_item.rs b/src/generate/generate_item.rs index 7886906..7c2affc 100644 --- a/src/generate/generate_item.rs +++ b/src/generate/generate_item.rs @@ -73,7 +73,7 @@ impl<'a> GenConst<'a> { builder .punct('#') .punct('!') - .group(Delimiter::Brace, |builder| { + .group(Delimiter::Bracket, |builder| { builder.push_parsed(attr)?; Ok(()) })?; @@ -350,7 +350,7 @@ impl<'a, P: FnParent> FnBuilder<'a, P> { // attrs for attr in attrs { - builder.punct('#').group(Delimiter::Brace, |builder| { + builder.punct('#').group(Delimiter::Bracket, |builder| { builder.push_parsed(attr)?; Ok(()) })?; diff --git a/src/generate/impl.rs b/src/generate/impl.rs index 947798f..e3b9a7d 100644 --- a/src/generate/impl.rs +++ b/src/generate/impl.rs @@ -45,7 +45,7 @@ impl<'a, P: Parent> Impl<'a, P> { /// Add a outer attribute to the trait implementation pub fn impl_outer_attr(&mut self, attr: impl AsRef) -> Result { let mut builder = StreamBuilder::new(); - builder.punct('#').group(Delimiter::Brace, |builder| { + builder.punct('#').group(Delimiter::Bracket, |builder| { builder.push_parsed(attr)?; Ok(()) })?; diff --git a/src/generate/impl_for.rs b/src/generate/impl_for.rs index 22d2333..b9eb421 100644 --- a/src/generate/impl_for.rs +++ b/src/generate/impl_for.rs @@ -80,7 +80,7 @@ impl<'a, P: Parent> ImplFor<'a, P> { /// Add a outer attribute to the trait implementation pub fn impl_outer_attr(&mut self, attr: impl AsRef) -> Result { let mut builder = StreamBuilder::new(); - builder.punct('#').group(Delimiter::Brace, |builder| { + builder.punct('#').group(Delimiter::Bracket, |builder| { builder.push_parsed(attr)?; Ok(()) })?; diff --git a/test/derive/src/lib.rs b/test/derive/src/lib.rs index df5fda8..4312131 100644 --- a/test/derive/src/lib.rs +++ b/test/derive/src/lib.rs @@ -11,6 +11,7 @@ fn derive_ret_hi_inner(input: TokenStream) -> Result { generator .generate_impl() .generate_fn("hi") + .with_attr("inline(never)") .with_self_arg(FnSelfArg::RefSelf) .with_return_type("&'static str") .body(|body| { From 39db1c8158693ead448aee97647ea895bc002edd Mon Sep 17 00:00:00 2001 From: Trangar Date: Tue, 17 Oct 2023 16:48:30 +0200 Subject: [PATCH 3/3] Release 0.0.15 (#73) Co-authored-by: Victor Koenders --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 00acb2e..7e39d6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "virtue" -version = "0.0.14" +version = "0.0.15" edition = "2021" description = "A sinless derive macro helper" license = "MIT"