summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-03-10 10:30:17 -0500
committerkyren <kerriganw@gmail.com>2018-03-10 10:30:17 -0500
commit6470b6eefc37eec83b573d7438eba19f644c97cb (patch)
treeaf15d7a4f9ca9826893210a5c2b73051bbf042d0 /src
parent431f84012a59582c299bbbd6adf41ff252f78357 (diff)
downloadmlua-6470b6eefc37eec83b573d7438eba19f644c97cb.zip
Improve documentation about __index vs regular methods
Diffstat (limited to 'src')
-rw-r--r--src/userdata.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userdata.rs b/src/userdata.rs
index d40eb1f..e5db18f 100644
--- a/src/userdata.rs
+++ b/src/userdata.rs
@@ -83,8 +83,8 @@ impl<'lua, T: UserData> UserDataMethods<'lua, T> {
/// Regular methods are implemented by overriding the `__index` metamethod and returning the
/// accessed method. This allows them to be used with the expected `userdata:method()` syntax.
///
- /// If `add_meta_method` is used to override the `__index` metamethod, this approach will fall
- /// back to the user-provided metamethod if no regular method was found.
+ /// If `add_meta_method` is used to set the `__index` metamethod, the `__index` metamethod will
+ /// be used as a fall-back if no regular method is found.
pub fn add_method<A, R, M>(&mut self, name: &str, method: M)
where
A: FromLuaMulti<'lua>,