File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ use std::sync::LazyLock;
4
4
use sentry_core:: protocol:: { DebugMeta , Event } ;
5
5
use sentry_core:: { ClientOptions , Integration } ;
6
6
7
+ static DEBUG_META : LazyLock < DebugMeta > = LazyLock :: new ( || DebugMeta {
8
+ images : crate :: debug_images ( ) ,
9
+ ..Default :: default ( )
10
+ } ) ;
11
+
7
12
/// The Sentry Debug Images Integration.
8
13
pub struct DebugImagesIntegration {
9
14
filter : Box < dyn Fn ( & Event < ' _ > ) -> bool + Send + Sync > ,
@@ -30,6 +35,7 @@ impl DebugImagesIntegration {
30
35
31
36
impl Default for DebugImagesIntegration {
32
37
fn default ( ) -> Self {
38
+ LazyLock :: force ( & DEBUG_META ) ;
33
39
Self {
34
40
filter : Box :: new ( |_| true ) ,
35
41
}
@@ -56,11 +62,6 @@ impl Integration for DebugImagesIntegration {
56
62
mut event : Event < ' static > ,
57
63
_opts : & ClientOptions ,
58
64
) -> Option < Event < ' static > > {
59
- static DEBUG_META : LazyLock < DebugMeta > = LazyLock :: new ( || DebugMeta {
60
- images : crate :: debug_images ( ) ,
61
- ..Default :: default ( )
62
- } ) ;
63
-
64
65
if event. debug_meta . is_empty ( ) && ( self . filter ) ( & event) {
65
66
event. debug_meta = Cow :: Borrowed ( & DEBUG_META ) ;
66
67
}
You can’t perform that action at this time.
0 commit comments