commit | 048fc04e7fd0dd2014a94e73fb34f6e59021c170 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Thu Apr 16 10:44:22 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Thu Apr 16 10:46:29 2020 -0700 |
tree | f9b501b392f13f2ca9d86d0a9d377b181f624dfb | |
parent | 2dd07da5420c40e365646bf756938d8d1abf6d62 [diff] [blame] |
Import 'regex-syntax' package vesion 0.6.17 * Add OWNERS Bug: 152884384 Test: make Change-Id: I760a69ffc851039ceaff58980deece308a426aed
diff --git a/src/either.rs b/src/either.rs new file mode 100644 index 0000000..7ae41e4 --- /dev/null +++ b/src/either.rs
@@ -0,0 +1,8 @@ +/// A simple binary sum type. +/// +/// This is occasionally useful in an ad hoc fashion. +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum Either<Left, Right> { + Left(Left), + Right(Right), +}