Remove dead code

```
error: method `with` is never used
  --> src/sync.rs:65:12
   |
62 |     pub(crate) trait UnsafeCellExt {
   |                      ------------- method in this trait
...
65 |         fn with<R, F>(&self, f: F) -> R
   |            ^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
```
This commit is contained in:
Taiki Endo 2024-03-04 04:27:09 +09:00
parent 93ee058b7f
commit d49453323c
1 changed files with 0 additions and 11 deletions

View File

@ -62,10 +62,6 @@ pub(crate) mod prelude {
pub(crate) trait UnsafeCellExt {
type Value;
fn with<R, F>(&self, f: F) -> R
where
F: FnOnce(*const Self::Value) -> R;
fn with_mut<R, F>(&self, f: F) -> R
where
F: FnOnce(*mut Self::Value) -> R;
@ -74,13 +70,6 @@ pub(crate) mod prelude {
impl<T> UnsafeCellExt for cell::UnsafeCell<T> {
type Value = T;
fn with<R, F>(&self, f: F) -> R
where
F: FnOnce(*const Self::Value) -> R,
{
f(self.get())
}
fn with_mut<R, F>(&self, f: F) -> R
where
F: FnOnce(*mut Self::Value) -> R,