File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ include = [
2222
2323[target .'cfg(all(unix, not(target_os = "macos")))' .dependencies ]
2424dbus = { version = " 0.9" , optional = true }
25- lazy_static = { version = " 1.5" , optional = true }
2625image = { version = " 0.25" , optional = true }
2726zbus = { version = " 5" , optional = true }
2827serde = { version = " 1" , optional = true }
@@ -45,7 +44,7 @@ d_vendored = ["dbus/vendored"]
4544z = [" zbus" , " serde" , " async" ]
4645async = []
4746debug_namespace = []
48- images = [" image" , " lazy_static " ]
47+ images = [" image" ]
4948
5049[dev-dependencies ]
5150color-backtrace = " 0.7" # wait for MSVR 1.70 to update
Original file line number Diff line number Diff line change @@ -156,10 +156,6 @@ extern crate mac_notification_sys;
156156#[ cfg( target_os = "windows" ) ]
157157extern crate winrt_notification;
158158
159- #[ macro_use]
160- #[ cfg( all( feature = "images" , unix, not( target_os = "macos" ) ) ) ]
161- extern crate lazy_static;
162-
163159pub mod error;
164160mod hints;
165161mod miniver;
@@ -212,13 +208,13 @@ pub use crate::urgency::Urgency;
212208pub use crate :: { notification:: Notification , timeout:: Timeout } ;
213209
214210#[ cfg( all( feature = "images" , unix, not( target_os = "macos" ) ) ) ]
215- lazy_static ! {
216- /// Read once at runtime. Needed for Images
217- pub static ref SPEC_VERSION : miniver:: Version =
218- get_server_information( )
211+ /// Read once at runtime. Needed for Images
212+ pub static SPEC_VERSION : std:: sync:: LazyLock < miniver:: Version > = std:: sync:: LazyLock :: new ( || {
213+ get_server_information ( )
219214 . and_then ( |info| info. spec_version . parse :: < miniver:: Version > ( ) )
220- . unwrap_or_else( |_| miniver:: Version :: new( 1 , 1 ) ) ;
221- }
215+ . unwrap_or_else ( |_| miniver:: Version :: new ( 1 , 1 ) )
216+ } ) ;
217+
222218/// Return value of `get_server_information()`.
223219#[ derive( Debug ) ]
224220pub struct ServerInformation {
You can’t perform that action at this time.
0 commit comments