Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated elements #10999

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_core/src/task_pool_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
},
}
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_math/src/primitives/dim2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_math/src/primitives/dim3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_text/src/glyph_brush.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down