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

Add Instance:IsA()#52

Open
jeparlefrancais wants to merge 6 commits intorojo-rbx:masterfrom
jeparlefrancais:is-a
Open

Add Instance:IsA()#52
jeparlefrancais wants to merge 6 commits intorojo-rbx:masterfrom
jeparlefrancais:is-a

Conversation

@jeparlefrancais
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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