Josh Stone
185bba75b6
Merge pull request #56 from Lipen/feature/github-actions
...
Add Github Actions workflow
2022-06-23 17:44:56 -07:00
Josh Stone
a9a56bd390
Limit CI branches to master
2022-06-23 17:41:17 -07:00
Zachary S
189dc97ccf
Change factor_error to factor_err for consistency with std.
2022-06-23 19:20:22 -05:00
Josh Stone
73891f4dcc
Make the for_both!
example like the other macros
2022-06-23 17:09:57 -07:00
Josh Stone
7f33354ec8
Remove Travis CI
2022-06-23 16:54:50 -07:00
Konstantin Chukharev
7c658d99f5
Add Github Actions workflow
2022-06-23 16:54:30 -07:00
Josh Stone
c5bf4fe91a
Merge pull request #58 from thomaseizinger/export-macro
...
Publicly expose `either` macro as `for_both`
2022-06-23 16:39:43 -07:00
Josh Stone
56d61a88b6
Add a syntax description of for_both!
...
Co-authored-by: bluss <bluss@users.noreply.github.com>
2022-06-23 16:37:03 -07:00
Josh Stone
8986fc063a
Merge pull request #63 from TonalidadeHidrica/into-common-type
...
Add `into_common`
2022-06-23 16:35:36 -07:00
Zachary S
8a0409473e
Feature: add methods to factor common Result and Option types.
...
Similar to Either::factor_first/second and Result/Option::transpose (though those lose no information).
Either::factor_none takes an Either<Option<L>, Option<R>> and gives an Option<Either<L, R>>,
merging Left(None) and Right(None) into None.
Either::factor_error takes an Either<Result<L, E>, Result<R, E>> and gives an Result<Either<L, R>, E>,
merging Left(Err) and Right(Err) into Err.
Similar for Either::factor_ok.
2022-04-07 16:36:33 -05:00
TonalidadeHidrica
77ca6dec5f
Merge remote-tracking branch 'origin/into-common-type' into into-common-type
2022-01-07 04:34:51 +09:00
TonalidadeHidrica
3ddd026a16
Rename into_common to either_into
2022-01-07 04:33:24 +09:00
TonalidadeHidrica
88bf5e58bf
Update src/lib.rs
...
Co-authored-by: bluss <bluss@users.noreply.github.com>
2021-11-28 14:05:55 +09:00
TonalidadeHidrica
cfed5747c8
Tweak constraints to use Into
instead of From
2021-11-26 00:49:23 +09:00
TonalidadeHidrica
e2c2259f2f
Add into_common
2021-11-26 00:33:56 +09:00
Josh Stone
1bd70a2e6e
Merge pull request #59 from atouchet/bdg
...
Fix crates.io badge and update links
2021-09-28 16:34:28 -07:00
Alex Touchet
171e053188
Fix crates.io badge and update links
2021-09-25 17:15:58 -07:00
Thomas Eizinger
2742b1aadb
Publicly expose the for_both
macro
...
Resolves #57 .
2021-09-20 10:57:42 +10:00
Thomas Eizinger
09721df302
Ensure Either
type is referenced correctly
...
Crates can be renamed in `Cargo.toml`. To ensure we reference the
`Either` type correctly, we need to use the special-cased `$crate`
substitution.
See https://veykril.github.io/tlborm/decl-macros/minutiae/import-export.html .
2021-09-20 10:37:24 +10:00
Thomas Eizinger
8de63321e3
Rename either
macro to for_both
...
This is in preparation for the macro being publicly exported.
2021-09-20 10:36:26 +10:00
Josh Stone
6d3216446d
Merge pull request #51 from spenserblack/feature/unwrap-expect
...
Feature: `unwrap_left` `unwrap_right` `expect_left` `expect_right`
2020-09-16 16:09:45 -07:00
Josh Stone
6e9590032b
Release 1.6.1
2020-09-16 16:02:30 -07:00
Spenser Black
7f3a36833d
Add expects
2020-08-11 10:22:27 -04:00
Spenser Black
7f092c69d0
Add unwraps
2020-08-11 10:19:44 -04:00
Josh Stone
1ed67aa0e5
Merge pull request #50 from cuviper/release-1.6.0
...
Release 1.6.0
2020-08-10 16:25:36 -07:00
Josh Stone
fd7188e2f0
Release 1.6.0
2020-08-10 15:51:53 -07:00
Josh Stone
27a81dbb0f
Add spacing to the untagged examples
2020-08-10 15:22:05 -07:00
Josh Stone
89c0b2cc5e
Pattern-match untagged serialization directly
...
It's more verbose, but it mirrors the deserialization.
2020-08-10 14:25:37 -07:00
Josh Stone
4943fbbc0a
Avoid deprecated try!
2020-08-10 14:13:57 -07:00
Josh Stone
8e61186f32
Allow deprecated Error::description call
2020-08-10 14:04:12 -07:00
Josh Stone
1f36d0901b
Hide unknown bare_trait_objects for old rustc
2020-08-10 14:02:10 -07:00
Josh Stone
f157609395
cargo fmt
2020-08-10 14:01:17 -07:00
Josh Stone
c5d0146996
Merge pull request #49 from MikailBag/untagged
...
Add special utitilies for serde untagged repr
2020-08-10 13:17:19 -07:00
Josh Stone
fc8cd5ae2a
Unpin serde, instead downgrade in .travis.yml for 1.12
2020-08-10 12:30:10 -07:00
Mikail Bagishov
293fb50e6f
pin serde too
2020-08-09 01:52:25 +03:00
Mikail Bagishov
44a92ed49e
fix doctest
2020-08-09 01:47:48 +03:00
Mikail Bagishov
44ca404124
address review
2020-08-09 01:46:42 +03:00
Mikail Bagishov
e83db0e3be
Add special utitilies for serde untagged repr
2020-07-23 01:02:01 +03:00
Josh Stone
8c9dc14354
Merge pull request #43 from AnderEnder/deprecated-error-description
...
Allow deprecated Error::description
2020-01-04 22:41:15 -07:00
Radyk Andrii
655be7f14d
allow deprecated Error::description
2020-01-01 21:31:59 +01:00
bluss
bdef374df0
Merge pull request #42 from trivikr/allow_bare_trait_objects
...
fix: allow bare_trait_objects
2019-10-16 17:52:35 +02:00
Kamat, Trivikram
9da7f3f1cc
fix: allow bare_trait_objects
...
Fixes: https://github.com/bluss/either/issues/41
2019-10-16 07:15:08 -07:00
bluss
cd15a34111
1.5.3
2019-09-13 19:44:35 +02:00
bluss
278a78cbfa
FIX: Fix warning in test
...
This deprecation warning is easy to fix, because we don't need a range
to test this. (Other deprecation warnings are not so easy to fix while
preserving support for the same versions.)
2019-09-13 19:43:03 +02:00
bluss
8700537f7e
Merge pull request #40 from nvzqz/more-ops
...
Add operations to `Either`
2019-09-12 17:55:12 +02:00
Nikolai Vazquez
ae03f53320
Add Either::map
2019-09-07 21:06:10 -04:00
Josh Stone
44361c1c19
Merge pull request #37 from rivertam/patch-1
...
Quick fix for doc comment
2019-04-04 09:04:51 -07:00
Ben Berman
a291b71ac7
Quick fix for doc comment
2019-04-03 22:02:22 -04:00
Josh Stone
6e0c08a5d0
Merge pull request #36 from DCjanus/master
...
FEAT: add `left_or`, `left_or_else`, `right_or`, `right_or_else` method.
2019-04-02 15:39:28 -07:00
Josh Stone
b8d01e40e6
Bump to 1.5.2
2019-04-02 15:28:57 -07:00