Skip to content

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

Merged
emilk merged 6 commits intoemilk:masterfrom
Barugon:info_ref
Sep 5, 2023
Merged

eframe::Frame::info returns a reference#3301
emilk merged 6 commits intoemilk:masterfrom
Barugon:info_ref

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
@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