Improve docs.

This commit is contained in:
Stephen Chung
2020-07-28 19:11:37 +08:00
parent b63ff56e09
commit 37ea24afe9
2 changed files with 25 additions and 18 deletions

View File

@@ -283,10 +283,8 @@ impl CallableFunction {
/// Get the access mode.
pub fn access(&self) -> FnAccess {
match self {
CallableFunction::Pure(_)
| CallableFunction::Method(_)
| CallableFunction::Iterator(_) => FnAccess::Public,
CallableFunction::Script(f) => f.access,
Self::Pure(_) | Self::Method(_) | Self::Iterator(_) => FnAccess::Public,
Self::Script(f) => f.access,
}
}
/// Get a reference to a native Rust function.