Remove P::map.

It's barely used, and the places that use it are better if they don't.
This commit is contained in:
Nicholas Nethercote
2025-05-27 01:42:51 +10:00
parent a35675d38f
commit 6973fa08a3
4 changed files with 21 additions and 38 deletions

View File

@@ -51,17 +51,6 @@ impl<T> P<T> {
*self.ptr
}
/// Produce a new `P<T>` from `self` without reallocating.
pub fn map<F>(mut self, f: F) -> P<T>
where
F: FnOnce(T) -> T,
{
let x = f(*self.ptr);
*self.ptr = x;
self
}
/// Optionally produce a new `P<T>` from `self` without reallocating.
pub fn filter_map<F>(mut self, f: F) -> Option<P<T>>
where