4
4
use crate :: { PyRef , VirtualMachine , builtins:: PyModule } ;
5
5
6
6
pub ( crate ) fn make_module ( vm : & VirtualMachine ) -> PyRef < PyModule > {
7
- let module = winreg:: make_module ( vm) ;
8
- module
7
+ winreg:: make_module ( vm)
9
8
}
10
9
11
10
#[ pymodule]
@@ -53,48 +52,55 @@ mod winreg {
53
52
#[ pyattr( once) ]
54
53
fn HKEY_CLASSES_ROOT ( _vm : & VirtualMachine ) -> PyHKEYObject {
55
54
PyHKEYObject {
55
+ #[ allow( clippy:: arc_with_non_send_sync) ]
56
56
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_CLASSES_ROOT ) ) ,
57
57
}
58
58
}
59
59
60
60
#[ pyattr( once) ]
61
61
fn HKEY_CURRENT_USER ( _vm : & VirtualMachine ) -> PyHKEYObject {
62
62
PyHKEYObject {
63
+ #[ allow( clippy:: arc_with_non_send_sync) ]
63
64
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_CURRENT_USER ) ) ,
64
65
}
65
66
}
66
67
67
68
#[ pyattr( once) ]
68
69
fn HKEY_LOCAL_MACHINE ( _vm : & VirtualMachine ) -> PyHKEYObject {
69
70
PyHKEYObject {
71
+ #[ allow( clippy:: arc_with_non_send_sync) ]
70
72
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_LOCAL_MACHINE ) ) ,
71
73
}
72
74
}
73
75
74
76
#[ pyattr( once) ]
75
77
fn HKEY_USERS ( _vm : & VirtualMachine ) -> PyHKEYObject {
76
78
PyHKEYObject {
79
+ #[ allow( clippy:: arc_with_non_send_sync) ]
77
80
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_USERS ) ) ,
78
81
}
79
82
}
80
83
81
84
#[ pyattr( once) ]
82
85
fn HKEY_PERFORMANCE_DATA ( _vm : & VirtualMachine ) -> PyHKEYObject {
83
86
PyHKEYObject {
87
+ #[ allow( clippy:: arc_with_non_send_sync) ]
84
88
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_PERFORMANCE_DATA ) ) ,
85
89
}
86
90
}
87
91
88
92
#[ pyattr( once) ]
89
93
fn HKEY_CURRENT_CONFIG ( _vm : & VirtualMachine ) -> PyHKEYObject {
90
94
PyHKEYObject {
95
+ #[ allow( clippy:: arc_with_non_send_sync) ]
91
96
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_CURRENT_CONFIG ) ) ,
92
97
}
93
98
}
94
99
95
100
#[ pyattr( once) ]
96
101
fn HKEY_DYN_DATA ( _vm : & VirtualMachine ) -> PyHKEYObject {
97
102
PyHKEYObject {
103
+ #[ allow( clippy:: arc_with_non_send_sync) ]
98
104
hkey : Arc :: new ( PyRwLock :: new ( Registry :: HKEY_DYN_DATA ) ) ,
99
105
}
100
106
}
@@ -825,14 +831,14 @@ mod winreg {
825
831
}
826
832
// REG_SZ is fallthrough
827
833
REG_EXPAND_SZ => {
828
- return Err ( vm. new_type_error (
834
+ Err ( vm. new_type_error (
829
835
"TODO: RUSTPYTHON REG_EXPAND_SZ is not supported" . to_string ( ) ,
830
- ) ) ;
836
+ ) )
831
837
}
832
838
REG_MULTI_SZ => {
833
- return Err (
839
+ Err (
834
840
vm. new_type_error ( "TODO: RUSTPYTHON REG_MULTI_SZ is not supported" . to_string ( ) )
835
- ) ;
841
+ )
836
842
}
837
843
// REG_BINARY is fallthrough
838
844
_ => {
0 commit comments