Skip to content

Commit d5e3815

Browse files
committed
add links to badges
1 parent 16342fb commit d5e3815

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# zips ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/cartercanedy/zips/test.yml?style=for-the-badge&label=tests) ![Crates.io Total Downloads](https://img.shields.io/crates/d/zips?style=for-the-badge&label=downloads)
1+
# zips [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/cartercanedy/zips/test.yml?style=for-the-badge&label=tests)](https://github.com/cartercanedy/zips/actions/workflows/test.yml/) [![Crates.io Total Downloads](https://img.shields.io/crates/d/zips?style=for-the-badge&label=downloads)](https://crates.io/crates/zips)
22
Just because I was annoyed that I couldn't use `Option<T>::zip` with more than 2 arguments...
33

44
Zips provides 2 proc-macros that accept any number of either `Option<T>`s or `Result<T, E>`s as arguments and produces an `Option<(T [, T...])>`.
@@ -41,6 +41,8 @@ fn main() -> () {
4141
// zipped_ok: Option<(i32, usize)>
4242
let zipped_ok = zip_result!(m, n);
4343
assert_eq!(zipped_some, Some((1i32, 0usize)));
44+
45+
let zipped_ok: Result<(i32, usize), ()> = Ok(zipped_ok.unwrap());
4446

4547
// zipped_err: Option<((i32, usize), ())>
4648
let zipped_err = zip_result!(zipped_ok, o);

0 commit comments

Comments
 (0)