Skip to content

Commit

Permalink
chore: Rust 1.82 checks, bumped dependencies (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF authored Oct 22, 2024
1 parent 5a2acd2 commit 166df13
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
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

0 comments on commit 166df13

Please sign in to comment.