From 3a15922d2ffc041c3523edb479f008a9034fd400 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 26 Nov 2021 16:32:06 +0100 Subject: X/Y abstractions --- src/util/mod.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/util/mod.rs') 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 { - /// Replace `self` with `other` if `self` is `Some`. - fn and_set(&mut self, other: Option); - /// 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 { } impl OptionExt for Option { - fn and_set(&mut self, other: Option) { - if self.is_some() { - *self = other; - } - } - fn set_min(&mut self, other: T) where T: Ord, -- cgit v1.2.3