File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ fn run() -> Result<(), Box<dyn Error>> {
1919 device_watcher. Added ( TypedEventHandler :: new ( move |_sender, args : & Option < DeviceInformation > | {
2020 // ここで ? してもイベントハンドラのResultに反映されるだけ
2121 let device_info = args. as_ref ( ) . unwrap ( ) ;
22- println ! ( "Added: {} ({})" , device_info. Id ( ) . unwrap( ) , device_info. Name ( ) . unwrap( ) ) ;
22+ println ! ( "[DeviceWatcher] Added: {} ({})" , device_info. Id ( ) . unwrap( ) , device_info. Name ( ) . unwrap( ) ) ;
2323 let new_connection = connect ( device_info. Id ( ) . unwrap ( ) ) . unwrap ( ) ;
2424 connection. replace ( Some ( new_connection) ) ;
2525 Ok ( ( ) )
2626 } ) ) . unwrap ( ) ;
2727 device_watcher. Removed ( TypedEventHandler :: new ( move |_sender, args : & Option < DeviceInformationUpdate > | {
2828 // ここで ? してもイベントハンドラのResultに反映されるだけ
2929 let update = args. as_ref ( ) . unwrap ( ) ;
30- println ! ( "Removed: {0}" , update. Id ( ) . unwrap( ) ) ;
30+ println ! ( "[DeviceWatcher] Removed: {0}" , update. Id ( ) . unwrap( ) ) ;
3131 if let Some ( con) = connection2. borrow ( ) . as_ref ( ) {
3232 if con. DeviceId ( ) . unwrap ( ) == update. Id ( ) . unwrap ( ) {
3333 connection2. replace ( None ) ;
You can’t perform that action at this time.
0 commit comments