Skip to content

Commit d9cf9e1

Browse files
committed
fix: options with target
1 parent 0e04c3b commit d9cf9e1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
cargo install --path .
1818
```
1919
3. Usage
20-
`cargo pn -- -m datarace -t my-crate --type library --api-spec tests/lib.toml--viz-callgraph --viz-petrinet`
20+
`cargo pn -- -m datarace -t my_crate --type library --api-spec tests/lib.toml--viz-callgraph --viz-petrinet`
2121

src/options.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ impl Options {
246246
_ => DetectorKind::Deadlock,
247247
};
248248

249-
self.crate_name = matches.get_one::<String>("target_crate").unwrap().clone();
249+
self.crate_name = matches
250+
.get_one::<String>("target_crate")
251+
.expect("The target crate must be declared and linked with an underscore.")
252+
.clone();
250253
self.output = matches
251254
.get_one::<String>("diagnostics_output")
252255
.cloned()

0 commit comments

Comments
 (0)