Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eframe::Frame::info returns a reference #3301

Merged
merged 6 commits into from
Sep 5, 2023
Merged

eframe::Frame::info returns a reference #3301

merged 6 commits into from
Sep 5, 2023

Conversation

Barugon
Copy link
Contributor

@Barugon Barugon commented Sep 4, 2023

Add a way to get IntegrationInfo as a reference in order to avoid a deep copy.

/// Get `IntegrationInfo` as a reference.
pub fn info_ref(&self) -> &IntegrationInfo {
&self.info
}
Copy link
Owner

Choose a reason for hiding this comment

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

Let's just change the old function to return a reference instead. Users can just call .clone() themselves.

@emilk emilk added the eframe Relates to epi and eframe label Sep 5, 2023
@emilk emilk changed the title Add info_ref method to Frame eframe::Frame::info returns a reference Sep 5, 2023
@emilk emilk merged commit 1b8e8cb into emilk:master Sep 5, 2023
18 of 19 checks passed
@Barugon Barugon deleted the info_ref branch September 5, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants