22use std:: { ffi:: OsString , time:: Duration } ;
33
44use windows_service:: {
5- Result , define_windows_service,
6- service:: {
5+ define_windows_service, service:: {
76 ServiceControl , ServiceControlAccept , ServiceExitCode , ServiceState , ServiceStatus ,
87 ServiceType ,
98 } ,
109 service_control_handler:: ServiceControlHandlerResult ,
1110 service_dispatcher,
11+ Result ,
1212} ;
1313
1414use crate :: { app:: Application , signal:: SignalTo } ;
@@ -24,12 +24,12 @@ pub mod service_control {
2424
2525 use snafu:: ResultExt ;
2626 use windows_service:: {
27- Result ,
2827 service:: {
2928 ServiceAccess , ServiceErrorControl , ServiceExitCode , ServiceInfo , ServiceStartType ,
3029 ServiceState , ServiceStatus ,
3130 } ,
3231 service_manager:: { ServiceManager , ServiceManagerAccess } ,
32+ Result ,
3333 } ;
3434
3535 use crate :: {
@@ -46,8 +46,8 @@ pub mod service_control {
4646
4747 impl fmt:: Display for ErrorDisplay < ' _ > {
4848 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
49- if let windows_service:: Error :: Winapi ( ref win_error) = & self . error {
50- write ! ( f, "{}" , win_error )
49+ if let windows_service:: Error :: Winapi ( win_error) = & self . error {
50+ write ! ( f, "{win_error}" )
5151 } else {
5252 write ! ( f, "{}" , & self . error)
5353 }
0 commit comments