File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ ### Improvements
6+
7+ - Make it possible to == Transaction/Span/TransactionOrSpan ([ #942 ] ( https://github.com/getsentry/sentry-rust/pull/942 ) ).
8+
39## 0.46.0
410
511### Breaking changes
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ pub type TracesSampler = dyn Fn(&TransactionContext) -> f32 + Send + Sync;
402402// global API types:
403403
404404/// A wrapper that groups a [`Transaction`] and a [`Span`] together.
405- #[ derive( Clone , Debug ) ]
405+ #[ derive( Clone , Debug , PartialEq ) ]
406406pub enum TransactionOrSpan {
407407 /// A [`Transaction`].
408408 Transaction ( Transaction ) ,
@@ -958,6 +958,12 @@ impl Transaction {
958958 }
959959}
960960
961+ impl PartialEq for Transaction {
962+ fn eq ( & self , other : & Self ) -> bool {
963+ Arc :: ptr_eq ( & self . inner , & other. inner )
964+ }
965+ }
966+
961967/// A smart pointer to a span's [`data` field](protocol::Span::data).
962968pub struct Data < ' a > ( MutexGuard < ' a , protocol:: Span > ) ;
963969
@@ -1203,6 +1209,12 @@ impl Span {
12031209 }
12041210}
12051211
1212+ impl PartialEq for Span {
1213+ fn eq ( & self , other : & Self ) -> bool {
1214+ Arc :: ptr_eq ( & self . span , & other. span )
1215+ }
1216+ }
1217+
12061218/// Represents a key-value pair such as an HTTP header.
12071219pub type TraceHeader = ( & ' static str , String ) ;
12081220
You can’t perform that action at this time.
0 commit comments