mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
Replace deprecated elements (#10999)
# Objective - Replace deprecated elements. ## Solution - Remove 'std::' from constants.
This commit is contained in:
parent
8ccde4a006
commit
645625b789
4 changed files with 10 additions and 10 deletions
|
@ -54,7 +54,7 @@ impl Default for TaskPoolOptions {
|
|||
TaskPoolOptions {
|
||||
// By default, use however many cores are available on the system
|
||||
min_total_threads: 1,
|
||||
max_total_threads: std::usize::MAX,
|
||||
max_total_threads: usize::MAX,
|
||||
|
||||
// Use 25% of cores for IO, at least 1, no more than 4
|
||||
io: TaskPoolThreadAssignmentPolicy {
|
||||
|
@ -73,7 +73,7 @@ impl Default for TaskPoolOptions {
|
|||
// Use all remaining cores for compute (at least 1)
|
||||
compute: TaskPoolThreadAssignmentPolicy {
|
||||
min_threads: 1,
|
||||
max_threads: std::usize::MAX,
|
||||
max_threads: usize::MAX,
|
||||
percent: 1.0, // This 1.0 here means "whatever is left over"
|
||||
},
|
||||
}
|
||||
|
|
|
@ -380,15 +380,15 @@ mod tests {
|
|||
Err(InvalidDirectionError::Zero)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction2d::new(Vec2::new(std::f32::INFINITY, 0.0)),
|
||||
Direction2d::new(Vec2::new(f32::INFINITY, 0.0)),
|
||||
Err(InvalidDirectionError::Infinite)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction2d::new(Vec2::new(std::f32::NEG_INFINITY, 0.0)),
|
||||
Direction2d::new(Vec2::new(f32::NEG_INFINITY, 0.0)),
|
||||
Err(InvalidDirectionError::Infinite)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction2d::new(Vec2::new(std::f32::NAN, 0.0)),
|
||||
Direction2d::new(Vec2::new(f32::NAN, 0.0)),
|
||||
Err(InvalidDirectionError::NaN)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -393,15 +393,15 @@ mod test {
|
|||
Err(InvalidDirectionError::Zero)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction3d::new(Vec3::new(std::f32::INFINITY, 0.0, 0.0)),
|
||||
Direction3d::new(Vec3::new(f32::INFINITY, 0.0, 0.0)),
|
||||
Err(InvalidDirectionError::Infinite)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction3d::new(Vec3::new(std::f32::NEG_INFINITY, 0.0, 0.0)),
|
||||
Direction3d::new(Vec3::new(f32::NEG_INFINITY, 0.0, 0.0)),
|
||||
Err(InvalidDirectionError::Infinite)
|
||||
);
|
||||
assert_eq!(
|
||||
Direction3d::new(Vec3::new(std::f32::NAN, 0.0, 0.0)),
|
||||
Direction3d::new(Vec3::new(f32::NAN, 0.0, 0.0)),
|
||||
Err(InvalidDirectionError::NaN)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -213,8 +213,8 @@ where
|
|||
T: ab_glyph::Font,
|
||||
{
|
||||
let mut text_bounds = Rect {
|
||||
min: Vec2::splat(std::f32::MAX),
|
||||
max: Vec2::splat(std::f32::MIN),
|
||||
min: Vec2::splat(f32::MAX),
|
||||
max: Vec2::splat(f32::MIN),
|
||||
};
|
||||
|
||||
for sg in section_glyphs {
|
||||
|
|
Loading…
Add table
Reference in a new issue