summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2021-12-17 23:16:54 +0800
committerGitHub <noreply@github.com>2021-12-17 15:16:54 +0000
commit2538c87d3e8f67c1a7c4ef634bcd09a0c77b9879 (patch)
tree089aecf07916d76e382c1db2880dd6c02e9b9842
parent3371851cbdea1d66e8f05a62dc4f32f9ef728622 (diff)
Remove outdated Rust compatibility code
-rw-r--r--alacritty_terminal/src/event_loop.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs
index 4bf0965e..113efc1a 100644
--- a/alacritty_terminal/src/event_loop.rs
+++ b/alacritty_terminal/src/event_loop.rs
@@ -429,32 +429,3 @@ where
})
}
}
-
-trait OptionInsert {
- type T;
- fn insert(&mut self, value: Self::T) -> &mut Self::T;
-}
-
-// TODO: Remove when MSRV is >= 1.53.0.
-//
-/// Trait implementation to support Rust version < 1.53.0.
-///
-/// This is taken [from STD], further license information can be found in the [rust-lang/rust
-/// repository].
-///
-///
-/// [from STD]: https://github.com/rust-lang/rust/blob/6e0b554619a3bb7e75b3334e97f191af20ef5d76/library/core/src/option.rs#L829-L858
-/// [rust-lang/rust repository]: https://github.com/rust-lang/rust/blob/master/LICENSE-MIT
-impl<T> OptionInsert for Option<T> {
- type T = T;
-
- fn insert(&mut self, value: T) -> &mut T {
- *self = Some(value);
-
- match self {
- Some(v) => v,
- // SAFETY: the code above just filled the option
- None => unsafe { std::hint::unreachable_unchecked() },
- }
- }
-}