diff --git a/easytier/src/utils.rs b/easytier/src/utils.rs index 10ae81d2..9bdba470 100644 --- a/easytier/src/utils.rs +++ b/easytier/src/utils.rs @@ -141,3 +141,11 @@ pub fn weak_upgrade(weak: &std::sync::Weak) -> anyhow::Result())) } + +pub trait BoxExt: Sized { + fn boxed(self) -> Box { + Box::new(self) + } +} + +impl BoxExt for T {}