Merge pull request #639 from iceiix/rust2021

Update to Rust 1.57.0 and 2021 edition
This commit is contained in:
iceiix 2021-12-24 10:53:27 -08:00 committed by GitHub
commit 21a1b64a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 16 deletions

View File

@ -11,7 +11,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
# TODO: refactor toolchain version
toolchain: 1.55.0
toolchain: 1.57.0
components: clippy, rustfmt
default: true
- name: Install dependencies
@ -49,7 +49,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.55.0
toolchain: 1.57.0
components: clippy, rustfmt
default: true
- name: Build binary
@ -83,7 +83,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.55.0
toolchain: 1.57.0
components: clippy, rustfmt
default: true
- name: Build binary
@ -128,7 +128,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
# TODO: refactor toolchain version
toolchain: 1.55.0
toolchain: 1.57.0
components: clippy, rustfmt
default: true
- name: Install wasm-pack

View File

@ -2,7 +2,8 @@
name = "stevenarella"
version = "0.0.1"
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonmail.ch>" ]
edition = "2018"
edition = "2021"
rust_version = "1.57"
resolver = "2"
description = "Multi-protocol multi-platform Minecraft-compatible client"
repository = "https://github.com/iceiix/stevenarella"

View File

@ -68,7 +68,7 @@ from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?r
## Dependencies
Requires Rust stable version 1.55.0 or newer.
Requires Rust stable version 1.57.0 or newer.
**Debian/Ubuntu**

View File

@ -2,7 +2,7 @@
name = "steven_blocks"
version = "0.0.1"
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
edition = "2018"
edition = "2021"
[dependencies]
lazy_static = "1.4.0"

View File

@ -2,7 +2,7 @@
name = "steven_protocol"
version = "0.0.1"
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonmail.ch>" ]
edition = "2018"
edition = "2021"
[dependencies]
serde = "1.0.132"

View File

@ -656,6 +656,7 @@ impl Serializable for ParticleData {
}
#[derive(Debug)]
#[allow(dead_code)]
pub struct VillagerData {
villager_type: protocol::VarInt,
profession: protocol::VarInt,

View File

@ -2,5 +2,5 @@
name = "steven_resources"
version = "0.1.0"
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
edition = "2018"
edition = "2021"
build = "build.rs"

View File

@ -2,6 +2,6 @@
name = "steven_shared"
version = "0.0.1"
authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>" ]
edition = "2018"
edition = "2021"
[dependencies]

View File

@ -540,9 +540,9 @@ fn main2() {
fn tick_all(
window: &winit::window::Window,
game: &mut Game,
mut ui_container: &mut ui::Container,
ui_container: &mut ui::Container,
last_frame: &mut Instant,
mut resui: &mut resources::ManagerUI,
resui: &mut resources::ManagerUI,
last_resource_version: &mut usize,
vsync: &mut bool,
) {
@ -558,7 +558,7 @@ fn tick_all(
let version = {
let try_res = game.resource_manager.try_write();
if let Ok(mut res) = try_res {
res.tick(&mut resui, &mut ui_container, delta);
res.tick(resui, ui_container, delta);
res.version()
} else {
// TODO: why does game.resource_manager.write() sometimes deadlock?
@ -591,7 +591,7 @@ fn tick_all(
.tick(&mut game.server.world, &mut game.renderer, version);
game.screen_sys
.tick(delta, &mut game.renderer, &mut ui_container);
.tick(delta, &mut game.renderer, ui_container);
/* TODO: open console for chat messages
if let Some(received_chat_at) = game.server.received_chat_at {
if Instant::now().duration_since(received_chat_at).as_secs() < 5 {
@ -603,7 +603,7 @@ fn tick_all(
game.console
.lock()
.unwrap()
.tick(&mut ui_container, &game.renderer, delta, width);
.tick(ui_container, &game.renderer, delta, width);
ui_container.tick(&mut game.renderer, delta, width, height);
game.renderer.tick(
&mut game.server.world,

View File

@ -880,7 +880,9 @@ struct RawModel {
uvlock: bool,
weight: f64,
#[allow(dead_code)]
display: HashMap<String, ModelDisplay, BuildHasherDefault<FNVHash>>,
#[allow(dead_code)]
builtin: BuiltinType,
}
@ -899,6 +901,7 @@ impl RawModel {
}
#[derive(Debug)]
#[allow(dead_code)]
struct ModelDisplay {
rotation: [f64; 3],
translation: [f64; 3],
@ -935,6 +938,7 @@ struct BlockFace {
struct Model {
faces: Vec<Face>,
ambient_occlusion: bool,
#[allow(dead_code)]
weight: f64,
}
@ -945,6 +949,7 @@ struct Face {
vertices: Vec<BlockVertex>,
vertices_texture: Vec<render::Texture>,
indices: usize,
#[allow(dead_code)]
shade: bool,
tint_index: i32,
}

View File

@ -2,7 +2,7 @@
name = "std_or_web"
version = "0.0.1"
authors = [ "iceiix <ice_ix@protonmail.ch>" ]
edition = "2018"
edition = "2021"
[dependencies]
cfg-if = "1.0.0"