Skip to content

Commit 29e0a2a

Browse files
committed
example: Use as_deref()
Minor cleanup I noticed.
1 parent 31b5a5b commit 29e0a2a

File tree

1 file changed

+1
-1
lines changed
  • examples/hello-world/xtask/src

1 file changed

+1
-1
lines changed

examples/hello-world/xtask/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() {
1717

1818
fn try_main() -> Result<(), DynError> {
1919
let task = env::args().nth(1);
20-
match task.as_ref().map(|it| it.as_str()) {
20+
match task.as_deref() {
2121
Some("dist") => dist()?,
2222
_ => print_help(),
2323
}

0 commit comments

Comments
 (0)