Skip to content

Commit

Permalink
Prepare onlyargs_derive 0.1.4 (#35)
Browse files Browse the repository at this point in the history
Only the derive crate has updates.

* Add missing positional args tests
  • Loading branch information
parasyte authored Feb 19, 2024
1 parent bd1a7b9 commit f99c7ff
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion onlyargs_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "onlyargs_derive"
description = "Obsessively tiny argument parsing derive macro"
version = "0.1.3"
version = "0.1.4"
authors = ["Jay Oster <[email protected]>"]
repository = "https://github.com/parasyte/onlyargs"
edition = "2021"
Expand Down
2 changes: 2 additions & 0 deletions onlyargs_derive/compile_tests/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ fn compile_tests() {
t.pass("compile_tests/positional_pathbuf.rs");
t.pass("compile_tests/positional_string.rs");
t.pass("compile_tests/positional_u8.rs");
t.pass("compile_tests/positional_u128.rs");
t.pass("compile_tests/positional_usize.rs");
t.compile_fail("compile_tests/conflicting_positional.rs");

t.pass("compile_tests/empty.rs");
t.pass("compile_tests/optional.rs");
Expand Down
7 changes: 7 additions & 0 deletions onlyargs_derive/compile_tests/conflicting_positional.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#[derive(Debug, onlyargs_derive::OnlyArgs)]
struct Args {
rest: Vec<String>,
more: Vec<String>,
}

fn main() {}
5 changes: 5 additions & 0 deletions onlyargs_derive/compile_tests/conflicting_positional.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
error: Positional arguments can only be specified once.
--> compile_tests/conflicting_positional.rs:4:5
|
4 | more: Vec<String>,
| ^^^^

0 comments on commit f99c7ff

Please sign in to comment.