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

Move to Rust stable #301

Merged
merged 2 commits into from
Mar 2, 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
2 changes: 1 addition & 1 deletion .cargo/config_fast_builds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rustflags = [
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe" # Use LLD Linker
rustflags = [
"-Zshare-generics=n",
"-Zshare-generics=n", # (Nightly)
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads.
]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [ labeled, opened, synchronize, reopened ]
env:
CARGO_TERM_COLOR: always
NIGHTLY_TOOLCHAIN: nightly
CARGO_TOOLCHAIN: stable
# Sparse cargo registry for faster updates
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand All @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
- name: Cache Cargo build files
uses: Leafwing-Studios/cargo-cache@v1
- name: Install alsa and udev
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
components: rustfmt, clippy
- name: Cache Cargo build files
uses: Leafwing-Studios/cargo-cache@v1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
GAME_OSX_APP_NAME: Foxtrot

CARGO_TERM_COLOR: always
NIGHTLY_TOOLCHAIN: nightly
CARGO_TOOLCHAIN: stable
# Sparse cargo registry for faster updates
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand All @@ -38,15 +38,15 @@ jobs:
- name: Install rust toolchain for Apple Silicon
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
target: aarch64-apple-darwin
- name: Build release for Apple Silicon
run: |
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) cargo build --release --target=aarch64-apple-darwin
- name: Install rust toolchain for Apple x86
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
target: x86_64-apple-darwin
- name: Build release for x86 Apple
run: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev
- name: Build release
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
toolchain: ${{ env.CARGO_TOOLCHAIN }}
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ blender_assets.cats.txt*
trace-*.json

.cargo/config.toml
rust-toolchain.toml
3 changes: 0 additions & 3 deletions rust-toolchain.toml

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(let_chains)]
// These two generate a lot of false positives for Bevy systems
#![allow(clippy::too_many_arguments, clippy::type_complexity)]

Expand Down
5 changes: 3 additions & 2 deletions src/player_control/camera/rig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ fn set_look_at(rig: &mut Rig, camera: &IngameCamera) {
}

fn set_position(rig: &mut Rig, camera: &IngameCamera) {
let target = if camera.kind != IngameCameraKind::FirstPerson
&& let Some(secondary_target) = camera.secondary_target
let target = if let Some(secondary_target) = camera
.secondary_target
.filter(|_| camera.kind != IngameCameraKind::FirstPerson)
{
secondary_target
} else {
Expand Down
Loading