File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ pub enum Error {
4242    GarbageCollectorError ( StdString ) , 
4343    /// Potentially unsafe action in safe mode. 
4444SafetyError ( StdString ) , 
45-     /// Setting memory limit  is not available. 
45+     /// Memory control  is not available. 
4646/// 
4747/// This error can only happen when Lua state was not created by us and does not have the 
4848/// custom allocator attached. 
49- MemoryLimitNotAvailable , 
49+ MemoryControlNotAvailable , 
5050    /// A mutable callback has triggered Lua code that has called the same mutable callback again. 
5151/// 
5252/// This is an error because a mutable callback can only be borrowed mutably once. 
@@ -220,8 +220,8 @@ impl fmt::Display for Error {
220220            Error :: SafetyError ( msg)  => { 
221221                write ! ( fmt,  "safety error: {msg}" ) 
222222            } , 
223-             Error :: MemoryLimitNotAvailable  => { 
224-                 write ! ( fmt,  "setting  memory limit  is not available" ) 
223+             Error :: MemoryControlNotAvailable  => { 
224+                 write ! ( fmt,  "memory control  is not available" ) 
225225            } 
226226            Error :: RecursiveMutCallback  => write ! ( fmt,  "mutable callback called recursively" ) , 
227227            Error :: CallbackDestructed  => write ! ( 
Original file line number Diff line number Diff line change @@ -792,7 +792,7 @@ impl Lua {
792792        unsafe  { 
793793            match  MemoryState :: get ( lua. main_state )  { 
794794                mem_state if  !mem_state. is_null ( )  => Ok ( ( * mem_state) . set_memory_limit ( limit) ) , 
795-                 _ => Err ( Error :: MemoryLimitNotAvailable ) , 
795+                 _ => Err ( Error :: MemoryControlNotAvailable ) , 
796796            } 
797797        } 
798798    } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments