Skip to content

Commit

Permalink
Remove sealed pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed May 8, 2024
1 parent 98861f1 commit 72d8e92
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/std/src/memory.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
use alloc::vec::Vec;
use core::{any::TypeId, marker::PhantomData, mem, ops::Deref, slice};

mod sealed {
pub trait Sealed: 'static {}
pub trait Ownership: 'static {}

impl Sealed for super::Owned {}
impl Ownership for Borrowed {}

impl Sealed for super::Borrowed {}
}

pub trait Ownership: sealed::Sealed + 'static {}

impl<T> Ownership for T where T: sealed::Sealed {}
impl Ownership for Owned {}

pub struct Owned;

Expand Down

0 comments on commit 72d8e92

Please sign in to comment.