File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ fn init_window_module(vm: &VirtualMachine) -> PyRef<PyModule> {
3939}
4040
4141impl StoredVirtualMachine {
42- fn new ( id : String , inject_browser_module : bool ) -> StoredVirtualMachine {
42+ fn new < I > ( id : String , inject_browser_module : bool , iter : I ) -> StoredVirtualMachine where
43+ I : IntoIterator < Item = ( Cow < ' static , str > , stdlib:: StdlibInitFunc ) > {
4344 let mut scope = None ;
4445 let mut settings = Settings :: default ( ) ;
4546 settings. allow_external_library = false ;
@@ -113,7 +114,8 @@ pub struct VMStore;
113114
114115#[ wasm_bindgen( js_class = vmStore) ]
115116impl VMStore {
116- pub fn init ( id : String , inject_browser_module : Option < bool > ) -> WASMVirtualMachine {
117+ pub fn init < i > ( id : String , inject_browser_module : Option < bool > , iter : I ) -> WASMVirtualMachine where
118+ I : IntoIterator < Item = ( Cow < ' static , str > , stdlib:: StdlibInitFunc ) > {
117119 STORED_VMS . with ( |cell| {
118120 let mut vms = cell. borrow_mut ( ) ;
119121 if !vms. contains_key ( & id) {
You can’t perform that action at this time.
0 commit comments