From 61c741f88721144dd27b49f986fae4d3fc6295a0 Mon Sep 17 00:00:00 2001 From: Luna Yao <40349250+ZnqbuZ@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:25:53 +0200 Subject: [PATCH] add BoxExt trait (#2036) --- easytier/src/utils.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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 {}