diff options
author | HampusM <hampus@hampusmat.com> | 2025-03-30 22:42:04 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-03-30 22:42:04 +0200 |
commit | 0a05701441c84773849e74cec168cb8852d58218 (patch) | |
tree | fd99b78e58c7b9f89100b645ea727b2eff61c688 /src/util.rs | |
parent | 2a30a0456c2d1898cc65908bd43a7f7b15abc7db (diff) |
refactor: make remove & swap_remove return new FieldOwned struct
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/util.rs b/src/util.rs index 8ff79c7..242df23 100644 --- a/src/util.rs +++ b/src/util.rs @@ -78,21 +78,3 @@ impl Drop for AnonUnique } } } - -#[derive(Debug)] -pub enum Either<A, B> -{ - A(A), - B(B), -} - -impl<A, B> Either<A, B> -{ - pub fn as_a(&self) -> Option<&A> - { - match self { - Self::A(a) => Some(a), - Self::B(_) => None, - } - } -} |