Skip to content

Commit 3a265c5

Browse files
authored
Merge pull request #454 from pacak/rc-0.9.26
Release 0.9.26
2 parents cc77231 + a678998 commit 3a265c5

5 files changed

Lines changed: 36 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bpaf"
3-
version = "0.9.25"
3+
version = "0.9.26"
44
edition = "2021"
55
categories = ["command-line-interface"]
66
description = "A simple Command Line Argument Parser with parser combinators"
@@ -21,7 +21,7 @@ include = [
2121

2222

2323
[dependencies]
24-
bpaf_derive = { path = "./bpaf_derive", version = "=0.5.23", optional = true }
24+
bpaf_derive = { path = "./bpaf_derive", version = "=0.5.26", optional = true }
2525
owo-colors = { version = ">=3.5, <5.0", default-features = false, optional = true }
2626
supports-color = { version = ">=2.0.0, <4.0", optional = true }
2727

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## bpaf [0.9.26], bpaf_derive [0.5.26] - 2026-05-13
4+
- Support struct level doc comments along with `adjacent` (#453)
5+
36
## bpaf [0.9.25] - 2026-04-15
47
- Change rendering of an adjacent block in Markdown - this is no longer a `###`
58
but a regular line item instead. Header messes up with generated navigation on

bpaf_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bpaf_derive"
3-
version = "0.5.23"
3+
version = "0.5.26"
44
edition = "2018"
55
categories = ["command-line-interface"]
66
description = "Derive macros for bpaf Command Line Argument Parser"

bpaf_derive/src/top.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ impl ToTokens for Top {
306306
#[allow(unused_imports)]
307307
use ::bpaf::Parser;
308308
#body
309-
#group_help
310309
#adjacent
310+
#group_help
311311
#(.#attrs)*
312312
#boxed
313313
}

bpaf_derive/src/top_tests.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,35 @@ fn adjacent_for_struct() {
11121112
assert_eq!(top.to_token_stream().to_string(), expected.to_string());
11131113
}
11141114

1115+
#[test]
1116+
fn adjacent_with_group_help() {
1117+
let top: Top = parse_quote! {
1118+
#[bpaf(adjacent)]
1119+
/// help text
1120+
struct Opts {
1121+
a: String,
1122+
b: String,
1123+
}
1124+
};
1125+
1126+
let expected = quote! {
1127+
#[doc(hidden)]
1128+
fn opts() -> impl ::bpaf::Parser<Opts> {
1129+
#[allow(unused_imports)]
1130+
use ::bpaf::Parser;
1131+
{
1132+
let a = ::bpaf::short('a').argument::<String>("ARG");
1133+
let b = ::bpaf::short('b').argument::<String>("ARG");
1134+
::bpaf::construct!(Opts { a, b, })
1135+
}
1136+
.adjacent()
1137+
.group_help("help text")
1138+
}
1139+
};
1140+
1141+
assert_eq!(top.to_token_stream().to_string(), expected.to_string());
1142+
}
1143+
11151144
#[test]
11161145
fn box_for_struct() {
11171146
let top: Top = parse_quote! {

0 commit comments

Comments
 (0)