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

chore: Rust 1.82 checks, bumped dependencies #180

Merged
merged 1 commit into from
Oct 22, 2024
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

* Bump `bevy_egui` dev dependency to `0.30`
* Bump `bevy_inspector_egui` dev dependency to `0.27`

## 0.18.0

* Fix `unexpected_cfgs` check complaining about `spirv` arch
Expand Down
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ features = ["html_reports"]

[dev-dependencies]
rand = "0.8"
bevy-inspector-egui = "0.25"
bevy_egui = "0.28"
bevy-inspector-egui = "0.27"
bevy_egui = "0.30"
approx = "0.5"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_arch, values("spirv"))'] }
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(target_arch, values("spirv"))',
] }

[[example]]
name = "hex_grid"
Expand Down
2 changes: 1 addition & 1 deletion examples/mesh_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fn show_ui(world: &mut World) {
ui.separator();
ui.heading("Sides UV options");
ui.horizontal(|ui| {
egui::ComboBox::from_id_source("Side Uv mode")
egui::ComboBox::from_id_salt("Side Uv mode")
.selected_text(params.sides_uvs_mode.label())
.show_ui(ui, |ui| {
let option = SideUVMode::Global;
Expand Down
2 changes: 1 addition & 1 deletion examples/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn show_ui(world: &mut World) {
world.resource_scope(|world, mut shape: Mut<Shape>| {
ui.horizontal(|ui| {
ui.label("Shape");
egui::ComboBox::from_id_source("Shape")
egui::ComboBox::from_id_salt("Shape")
.selected_text(shape.label())
.show_ui(ui, |ui| {
for option in Shape::all_values() {
Expand Down
3 changes: 2 additions & 1 deletion src/algorithms/field_of_movement.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::Hex;
use std::collections::{HashMap, HashSet};

/// Computes a field of movement around `coord` given a `budget`.
/// Computes a field of movement around `coord` given a `budget`
///
/// This algorithm takes a `cost` function, which calculates and
/// returns the cost of movement through a given `Hex` tile.
/// The `cost` function should return an `Option<u32>`.
Expand Down
6 changes: 4 additions & 2 deletions src/algorithms/fov.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::{EdgeDirection, Hex};
use std::collections::HashSet;

/// Computes a field of view around `coord` in a given `range`.
/// Computes a field of view around `coord` in a given `range`
///
/// This algorithm takes in account coordinates *visibility* through the
/// `blocking` argument. (*Blocking* coordinates should return `true`)
///
Expand Down Expand Up @@ -30,7 +31,8 @@ pub fn range_fov(coord: Hex, range: u32, blocking: impl Fn(Hex) -> bool) -> Hash
}

/// Computes a field of view around `coord` in a given `range` towards
/// `direction` with 120 degrees vision.
/// `direction` with 120 degrees vision
///
/// This algorithm takes in account coordinates *visibility* through the
/// `blocking` argument. (*Blocking* coordinates should return `true`)
///
Expand Down
3 changes: 2 additions & 1 deletion src/algorithms/pathfinding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ fn reconstruct_path(came_from: &HashMap<Hex, Hex>, end: Hex) -> Vec<Hex> {
path
}

/// Performs A star pathfinding between `start` and `end`.
/// Performs A star pathfinding between `start` and `end`
///
/// The `cost` parameter should give the cost of each coordinate (`Some`) or
/// indicate the coordinate is not included in the pathfinding (`None`).
/// This function already takes care of heuristics based on the distance between
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@
clippy::pedantic,
clippy::cargo,
clippy::unwrap_used,
missing_docs
missing_docs,
nonstandard_style,
future_incompatible
)]
#![allow(clippy::module_name_repetitions, clippy::multiple_crate_versions)]
/// Non exhaustive collection of classic algorithms.
Expand Down