File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ pub enum Error {
42
42
GarbageCollectorError ( StdString ) ,
43
43
/// Potentially unsafe action in safe mode.
44
44
SafetyError ( StdString ) ,
45
- /// Setting memory limit is not available.
45
+ /// Memory control is not available.
46
46
///
47
47
/// This error can only happen when Lua state was not created by us and does not have the
48
48
/// custom allocator attached.
49
- MemoryLimitNotAvailable ,
49
+ MemoryControlNotAvailable ,
50
50
/// A mutable callback has triggered Lua code that has called the same mutable callback again.
51
51
///
52
52
/// This is an error because a mutable callback can only be borrowed mutably once.
@@ -220,8 +220,8 @@ impl fmt::Display for Error {
220
220
Error :: SafetyError ( msg) => {
221
221
write ! ( fmt, "safety error: {msg}" )
222
222
} ,
223
- Error :: MemoryLimitNotAvailable => {
224
- write ! ( fmt, "setting memory limit is not available" )
223
+ Error :: MemoryControlNotAvailable => {
224
+ write ! ( fmt, "memory control is not available" )
225
225
}
226
226
Error :: RecursiveMutCallback => write ! ( fmt, "mutable callback called recursively" ) ,
227
227
Error :: CallbackDestructed => write ! (
Original file line number Diff line number Diff line change @@ -792,7 +792,7 @@ impl Lua {
792
792
unsafe {
793
793
match MemoryState :: get ( lua. main_state ) {
794
794
mem_state if !mem_state. is_null ( ) => Ok ( ( * mem_state) . set_memory_limit ( limit) ) ,
795
- _ => Err ( Error :: MemoryLimitNotAvailable ) ,
795
+ _ => Err ( Error :: MemoryControlNotAvailable ) ,
796
796
}
797
797
}
798
798
}
You can’t perform that action at this time.
0 commit comments