mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 14:49:06 -04:00
Turn HarnessBuilder::with_options into a proper builder method (#7697)
My bad when first creating it
This commit is contained in:
@@ -4,6 +4,7 @@ use egui::{Pos2, Rect, Vec2};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
/// Builder for [`Harness`].
|
||||
#[must_use]
|
||||
pub struct HarnessBuilder<State = ()> {
|
||||
pub(crate) screen_rect: Rect,
|
||||
pub(crate) pixels_per_point: f32,
|
||||
@@ -64,8 +65,10 @@ impl<State> HarnessBuilder<State> {
|
||||
|
||||
/// Set the default options used for snapshot tests on this harness.
|
||||
#[cfg(feature = "snapshot")]
|
||||
pub fn with_options(&mut self, options: crate::SnapshotOptions) {
|
||||
#[inline]
|
||||
pub fn with_options(mut self, options: crate::SnapshotOptions) -> Self {
|
||||
self.default_snapshot_options = options;
|
||||
self
|
||||
}
|
||||
|
||||
/// Override the [`egui::os::OperatingSystem`] reported to egui.
|
||||
|
||||
Reference in New Issue
Block a user