Skip to content

Commit

Permalink
remove get_owned and just use clone derive
Browse files Browse the repository at this point in the history
  • Loading branch information
cczetier committed Jan 8, 2025
1 parent ce4acb4 commit 992d54a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/stub/core_impl/tracepoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ impl<U: BeBytes> NewTracepoint<U> {
}
}

#[cfg(feature = "alloc")]
impl<U: Copy> NewTracepoint<U> {
/// Allocate an owned copy of this structure.
pub fn get_owned(&self) -> NewTracepoint<U> {
self.clone()
}
}

impl<U: crate::internal::BeBytes + num_traits::Zero + PrimInt> NewTracepoint<U> {
pub(crate) fn write<T: Target, C: Connection>(
&self,
Expand Down Expand Up @@ -237,7 +229,7 @@ impl<'a, U: Copy> TracepointItem<'a, U> {
/// Allocate an owned copy of this structure.
pub fn get_owned<'b>(&self) -> TracepointItem<'b, U> {
match self {
TracepointItem::New(n) => TracepointItem::New(n.get_owned()),
TracepointItem::New(n) => TracepointItem::New(n.clone()),
TracepointItem::Define(d) => TracepointItem::Define(d.get_owned()),
}
}
Expand Down

0 comments on commit 992d54a

Please sign in to comment.