summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-26 16:32:06 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-26 16:32:06 +0100
commit3a15922d2ffc041c3523edb479f008a9034fd400 (patch)
tree988fe103c0752696c1fade2123142a8db5361ab7 /src/util
parent393d74f9bb0d4c71a69108d5be261103c39f47f3 (diff)
X/Y abstractions
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mod.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/util/mod.rs b/src/util/mod.rs
index 8b74aed6..6fc1fb59 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -27,9 +27,6 @@ impl BoolExt for bool {
/// Additional methods for options.
pub trait OptionExt<T> {
- /// Replace `self` with `other` if `self` is `Some`.
- fn and_set(&mut self, other: Option<T>);
-
/// Sets `other` as the value if `self` is `None` or if it contains a value
/// larger than `other`.
fn set_min(&mut self, other: T)
@@ -44,12 +41,6 @@ pub trait OptionExt<T> {
}
impl<T> OptionExt<T> for Option<T> {
- fn and_set(&mut self, other: Option<T>) {
- if self.is_some() {
- *self = other;
- }
- }
-
fn set_min(&mut self, other: T)
where
T: Ord,