mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Remove impl Into<f32> arguments (#8194)
* Closes https://github.com/emilk/egui/issues/8179
This commit is contained in:
@@ -77,7 +77,7 @@ fn load_config() -> Config {
|
||||
match std::fs::read_to_string(&config_path) {
|
||||
Ok(config_str) => match toml::from_str(&config_str) {
|
||||
Ok(config) => config,
|
||||
Err(e) => panic!("Failed to parse {}: {e}", &config_path.display()),
|
||||
Err(e) => panic!("Failed to parse {}: {e}", config_path.display()),
|
||||
},
|
||||
Err(err) => {
|
||||
panic!("Failed to read {}: {}", config_path.display(), err);
|
||||
|
||||
@@ -279,11 +279,7 @@ impl<'a, State> Harness<'a, State> {
|
||||
/// Calculate the rect that includes all popups and tooltips.
|
||||
fn compute_total_rect_with_popups(&self) -> Option<Rect> {
|
||||
// Start with the standard response rect
|
||||
let mut used = if let Some(response) = self.response.as_ref() {
|
||||
response.rect
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
let mut used = self.response.as_ref()?.rect;
|
||||
|
||||
// Add all visible areas from other orders (popups, tooltips, etc.)
|
||||
self.ctx.memory(|mem| {
|
||||
|
||||
@@ -173,8 +173,9 @@ impl SnapshotOptions {
|
||||
/// The default is `0.6` (which is enough for most egui tests to pass across different
|
||||
/// wgpu backends).
|
||||
#[inline]
|
||||
pub fn threshold(mut self, threshold: impl Into<f32>) -> Self {
|
||||
self.threshold = threshold.into();
|
||||
pub fn threshold(mut self, threshold: impl Into<OsThreshold<f32>>) -> Self {
|
||||
let threshold = threshold.into().threshold();
|
||||
self.threshold = threshold;
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user