Commit f2cd1ba 1 parent 836ffab commit f2cd1ba Copy full SHA for f2cd1ba
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -302,11 +302,11 @@ pub const SCARD_ATTR_DEVICE_FRIENDLY_NAME: DWORD = SCARD_ATTR_DEVICE_FRIENDLY_NA
302
302
pub const SCARD_ATTR_DEVICE_SYSTEM_NAME : DWORD = SCARD_ATTR_DEVICE_SYSTEM_NAME_A ;
303
303
304
304
#[ cfg( target_os = "windows" ) ]
305
- pub fn SCARD_CTL_CODE ( code : DWORD ) -> DWORD {
305
+ pub const fn SCARD_CTL_CODE ( code : DWORD ) -> DWORD {
306
306
0x0031_0000 | ( code << 2 )
307
307
}
308
308
#[ cfg( not( target_os = "windows" ) ) ]
309
- pub fn SCARD_CTL_CODE ( code : DWORD ) -> DWORD {
309
+ pub const fn SCARD_CTL_CODE ( code : DWORD ) -> DWORD {
310
310
0x4200_0000 + code
311
311
}
312
312
Original file line number Diff line number Diff line change @@ -583,7 +583,7 @@ pub fn PNP_NOTIFICATION() -> &'static CStr {
583
583
/// to this function.
584
584
///
585
585
/// This function wraps the `SCARD_CTL_CODE` macro.
586
- pub fn ctl_code ( code : DWORD ) -> DWORD {
586
+ pub const fn ctl_code ( code : DWORD ) -> DWORD {
587
587
ffi:: SCARD_CTL_CODE ( code)
588
588
}
589
589
You can’t perform that action at this time.
0 commit comments