mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Enable the clippy::std_instead_of_core lint (#8394)
Prefer `core::` over `std::` where either work * Part of https://github.com/emilk/egui/issues/5735
This commit is contained in:
@@ -316,7 +316,7 @@ fn warn_if_rect_changes_id() {
|
||||
#[test]
|
||||
#[cfg(debug_assertions)]
|
||||
fn warn_if_rect_changes_id_false_positive_parent_shift() {
|
||||
use std::cell::Cell;
|
||||
use core::cell::Cell;
|
||||
|
||||
let counter = Cell::new(0);
|
||||
let button_rect = egui::Rect::from_min_size(egui::pos2(10.0, 10.0), egui::vec2(100.0, 30.0));
|
||||
|
||||
@@ -220,8 +220,8 @@ fn test_atom_selectable_senses_click_and_drag() {
|
||||
/// See <https://github.com/emilk/egui/issues/8217>.
|
||||
#[test]
|
||||
fn test_atom_selectable_text_can_be_copied() {
|
||||
use core::cell::Cell;
|
||||
use egui::{AtomLayout, Event, Modifiers, OutputCommand, PointerButton, Pos2, Rect};
|
||||
use std::cell::Cell;
|
||||
|
||||
fn copied_text(selectable: bool) -> Option<String> {
|
||||
let rect_cell = Cell::new(Rect::NOTHING);
|
||||
|
||||
@@ -381,7 +381,7 @@ fn switched_bottom_panel_harness(start_expanded: bool) -> Harness<'static, Switc
|
||||
}
|
||||
|
||||
/// Assert that the panel edge crossed `gap` gradually, rather than in one frame.
|
||||
fn assert_crossed_gradually(tops: &[f32], gap: std::ops::Range<f32>) {
|
||||
fn assert_crossed_gradually(tops: &[f32], gap: core::ops::Range<f32>) {
|
||||
let frames_in_gap = tops.iter().filter(|top| gap.contains(top)).count();
|
||||
assert!(
|
||||
3 <= frames_in_gap,
|
||||
|
||||
Reference in New Issue
Block a user