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

Bump MSRV to 1.68.2 #26

Merged
merged 1 commit into from
Jul 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
run: cargo doc --no-deps --workspace --all-features --document-private-items

check_msrv:
name: Check MSRV (1.60)
name: Check MSRV (1.68.2)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.60
- uses: dtolnay/rust-toolchain@1.68.2
- run: cargo check --workspace --all-features
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation = "https://docs.rs/dolly"
keywords = ["gamedev", "camera", "3d"]
categories = ["game-development"]
readme = "crates-io.md"
rust-version = "1.60"
rust-version = "1.68.2"

[dependencies]
glam = { version = ">=0.21, <=0.28", features = ["mint"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Crates.io](https://img.shields.io/crates/v/dolly.svg)](https://crates.io/crates/dolly)
[![Docs](https://docs.rs/dolly/badge.svg)](https://docs.rs/dolly)
[![Rust 1.60](https://img.shields.io/badge/Rust-1.60-fc8d62?logo=rust)](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1600-2022-04-07)
[![Rust 1.68.2](https://img.shields.io/badge/Rust-1.68.2-blue?logo=rust)](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1682-2023-03-28)

Combine simple building blocks to create smooth cameras: first-person, chase, orbit, look-at, you name it!

Expand Down
2 changes: 0 additions & 2 deletions src/drivers/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ use crate::{
/// Offsets the camera along a vector, in the coordinate space of the parent.
#[derive(Debug)]
pub struct Arm {
///
pub offset: mint::Vector3<f32>,
}

impl Arm {
///
pub fn new<V>(offset: V) -> Self
where
V: Into<mint::Vector3<f32>>,
Expand Down
1 change: 0 additions & 1 deletion src/drivers/look_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct LookAt {
}

impl LookAt {
///
pub fn new<P>(target: P) -> Self
where
P: Into<mint::Point3<f32>>,
Expand Down
1 change: 0 additions & 1 deletion src/drivers/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ impl Default for Position {
}

impl Position {
///
pub fn new<P>(position: P) -> Self
where
P: Into<mint::Point3<f32>>,
Expand Down
10 changes: 0 additions & 10 deletions src/rig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,16 @@ use std::marker::PhantomData;
/// A chain of drivers, calculating displacements, and animating in succession.
#[derive(Debug)]
pub struct CameraRig<H: Handedness = RightHanded> {
///
pub drivers: Vec<Box<dyn RigDriverTraits<H>>>,

///
pub final_transform: Transform<H>,

phantom: PhantomData<H>,
}

// Prevents user calls to `RigDriver::update`. All updates must come from `CameraRig::update`.
struct RigUpdateToken;

///
pub struct RigUpdateParams<'a, H: Handedness> {
///
pub parent: &'a Transform<H>,
///
pub delta_time_seconds: f32,

phantom: PhantomData<H>,
Expand Down Expand Up @@ -98,20 +91,17 @@ impl<H: Handedness> CameraRig<H> {
}
}

///
pub struct CameraRigBuilder<H: Handedness> {
drivers: Vec<Box<dyn RigDriverTraits<H>>>,
phantom: PhantomData<H>,
}

impl<H: Handedness> CameraRigBuilder<H> {
///
pub fn with(mut self, driver: impl RigDriverTraits<H>) -> Self {
self.drivers.push(Box::new(driver));
self
}

///
pub fn build(self) -> CameraRig<H> {
let mut rig = CameraRig {
drivers: self.drivers,
Expand Down
3 changes: 0 additions & 3 deletions src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub struct Transform<H: Handedness> {
}

impl<H: Handedness> Transform<H> {
///
pub fn from_position_rotation<P, Q>(position: P, rotation: Q) -> Self
where
P: Into<mint::Point3<f32>>,
Expand All @@ -29,7 +28,6 @@ impl<H: Handedness> Transform<H> {
}
}

///
pub fn into_position_rotation<P, Q>(self) -> (P, Q)
where
P: From<mint::Point3<f32>>,
Expand Down Expand Up @@ -65,7 +63,6 @@ impl<H: Handedness> Transform<H> {
From::from((rotation * H::FORWARD).into())
}

///
pub const IDENTITY: Transform<H> = Transform {
position: mint::Point3 {
x: 0.0,
Expand Down