File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -549,31 +549,6 @@ impl Lua {
549549 Ok ( ( ) )
550550 }
551551
552- #[ doc( hidden) ]
553- #[ deprecated( since = "0.11.0" , note = "Use `register_module` instead" ) ]
554- #[ cfg( not( feature = "luau" ) ) ]
555- #[ cfg( not( tarpaulin_include) ) ]
556- pub fn load_from_function < T : FromLua > ( & self , modname : & str , func : Function ) -> Result < T > {
557- let loaded = unsafe {
558- self . exec_raw :: < Table > ( ( ) , |state| {
559- ffi:: luaL_getsubtable ( state, ffi:: LUA_REGISTRYINDEX , ffi:: LUA_LOADED_TABLE ) ;
560- } ) ?
561- } ;
562-
563- let value = match loaded. raw_get ( modname) ? {
564- Value :: Nil => {
565- let result = match func. call ( modname) ? {
566- Value :: Nil => Value :: Boolean ( true ) ,
567- res => res,
568- } ;
569- loaded. raw_set ( modname, & result) ?;
570- result
571- }
572- res => res,
573- } ;
574- T :: from_lua ( value, self )
575- }
576-
577552 /// Unloads module `modname`.
578553 ///
579554 /// This method does not support unloading binary Lua modules since they are internally cached
You can’t perform that action at this time.
0 commit comments