Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Add Instance:IsA() #52

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jeparlefrancais
Copy link
Contributor

No description provided.

Comment on lines 250 to 258
let mut descriptor = database
.classes
.get(instance.class.as_str())
.ok_or_else(|| {
rlua::Error::external(format!(
"Unable to obtain class {} from reflection database",
&instance.class
))
})?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we restructure our loop so that this line only needs to happen once? If we start with

let mut class = Some(&descriptor.class);

and loop from there, we should be able to only have one block that calls classes.get

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if that's similar to what you had in mind 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants