Skip to content

Commit

Permalink
Merge branch 'bincode-org:trunk' into feature/mut-take-self
Browse files Browse the repository at this point in the history
  • Loading branch information
NightEule5 authored Oct 30, 2023
2 parents 0caced3 + 39db1c8 commit a5e122b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"steps": [
{
"uses": "actions/checkout@v3",
"uses": "actions/checkout@v4",
"name": "Checkout"
},
{
Expand Down Expand Up @@ -75,7 +75,7 @@
},
"steps": [
{
"uses": "actions/checkout@v3",
"uses": "actions/checkout@v4",
"name": "Checkout"
},
{
Expand Down Expand Up @@ -109,7 +109,7 @@
},
"steps": [
{
"uses": "actions/checkout@v3",
"uses": "actions/checkout@v4",
"name": "Checkout"
},
{
Expand All @@ -135,7 +135,7 @@
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v3",
"uses": "actions/checkout@v4",
"name": "Checkout"
},
{
Expand Down Expand Up @@ -171,7 +171,7 @@
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v3",
"uses": "actions/checkout@v4",
"name": "Checkout"
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v3"
"uses": "actions/checkout@v4"
},
{
"uses": "actions-rs/audit-check@v1",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/generate/generate_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl<'a> GenConst<'a> {
builder
.punct('#')
.punct('!')
.group(Delimiter::Brace, |builder| {
.group(Delimiter::Bracket, |builder| {
builder.push_parsed(attr)?;
Ok(())
})?;
Expand Down Expand Up @@ -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(())
})?;
Expand Down
2 changes: 1 addition & 1 deletion src/generate/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<str>) -> Result {
let mut builder = StreamBuilder::new();
builder.punct('#').group(Delimiter::Brace, |builder| {
builder.punct('#').group(Delimiter::Bracket, |builder| {
builder.push_parsed(attr)?;
Ok(())
})?;
Expand Down
2 changes: 1 addition & 1 deletion src/generate/impl_for.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<str>) -> Result {
let mut builder = StreamBuilder::new();
builder.punct('#').group(Delimiter::Brace, |builder| {
builder.punct('#').group(Delimiter::Bracket, |builder| {
builder.push_parsed(attr)?;
Ok(())
})?;
Expand Down
4 changes: 2 additions & 2 deletions src/parse/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand All @@ -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(())
}
Expand Down
1 change: 1 addition & 0 deletions test/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fn derive_ret_hi_inner(input: TokenStream) -> Result<TokenStream> {
generator
.generate_impl()
.generate_fn("hi")
.with_attr("inline(never)")
.with_self_arg(FnSelfArg::RefSelf)
.with_return_type("&'static str")
.body(|body| {
Expand Down

0 comments on commit a5e122b

Please sign in to comment.