Update to Rust 1.53.0

This commit is contained in:
ice_iix 2021-06-18 14:05:05 -07:00
parent a48a6f5a99
commit 9ae87f9340
3 changed files with 77 additions and 60 deletions

View File

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

View File

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

View File

@ -5883,47 +5883,53 @@ mod tests {
} }
fn can_burn<W: WorldAccess>(world: &W, pos: Position) -> bool { fn can_burn<W: WorldAccess>(world: &W, pos: Position) -> bool {
matches!(world.get_block(pos), Block::Planks { .. } matches!(
| Block::DoubleWoodenSlab { .. } world.get_block(pos),
| Block::WoodenSlab { .. } Block::Planks { .. }
| Block::FenceGate { .. } | Block::DoubleWoodenSlab { .. }
| Block::SpruceFenceGate { .. } | Block::WoodenSlab { .. }
| Block::BirchFenceGate { .. } | Block::FenceGate { .. }
| Block::JungleFenceGate { .. } | Block::SpruceFenceGate { .. }
| Block::DarkOakFenceGate { .. } | Block::BirchFenceGate { .. }
| Block::AcaciaFenceGate { .. } | Block::JungleFenceGate { .. }
| Block::Fence { .. } | Block::DarkOakFenceGate { .. }
| Block::SpruceFence { .. } | Block::AcaciaFenceGate { .. }
| Block::BirchFence { .. } | Block::Fence { .. }
| Block::JungleFence { .. } | Block::SpruceFence { .. }
| Block::DarkOakFence { .. } | Block::BirchFence { .. }
| Block::AcaciaFence { .. } | Block::JungleFence { .. }
| Block::OakStairs { .. } | Block::DarkOakFence { .. }
| Block::BirchStairs { .. } | Block::AcaciaFence { .. }
| Block::SpruceStairs { .. } | Block::OakStairs { .. }
| Block::JungleStairs { .. } | Block::BirchStairs { .. }
| Block::AcaciaStairs { .. } | Block::SpruceStairs { .. }
| Block::DarkOakStairs { .. } | Block::JungleStairs { .. }
| Block::Log { .. } | Block::AcaciaStairs { .. }
| Block::Log2 { .. } | Block::DarkOakStairs { .. }
| Block::Leaves { .. } | Block::Log { .. }
| Block::Leaves2 { .. } | Block::Log2 { .. }
| Block::BookShelf { .. } | Block::Leaves { .. }
| Block::TNT { .. } | Block::Leaves2 { .. }
| Block::TallGrass { .. } | Block::BookShelf { .. }
| Block::DoublePlant { .. } | Block::TNT { .. }
| Block::YellowFlower { .. } | Block::TallGrass { .. }
| Block::RedFlower { .. } | Block::DoublePlant { .. }
| Block::DeadBush { .. } | Block::YellowFlower { .. }
| Block::Wool { .. } | Block::RedFlower { .. }
| Block::Vine { .. } | Block::DeadBush { .. }
| Block::CoalBlock { .. } | Block::Wool { .. }
| Block::HayBlock { .. } | Block::Vine { .. }
| Block::Carpet { .. }) | Block::CoalBlock { .. }
| Block::HayBlock { .. }
| Block::Carpet { .. }
)
} }
fn is_snowy<W: WorldAccess>(world: &W, pos: Position) -> bool { fn is_snowy<W: WorldAccess>(world: &W, pos: Position) -> bool {
matches!(world.get_block(pos.shift(Direction::Up)), Block::Snow { .. } | Block::SnowLayer { .. }) matches!(
world.get_block(pos.shift(Direction::Up)),
Block::Snow { .. } | Block::SnowLayer { .. }
)
} }
fn can_connect_sides<F: Fn(Block) -> bool, W: WorldAccess>( fn can_connect_sides<F: Fn(Block) -> bool, W: WorldAccess>(
@ -5945,25 +5951,31 @@ fn can_connect<F: Fn(Block) -> bool, W: WorldAccess>(world: &W, pos: Position, f
} }
fn can_connect_fence(block: Block) -> bool { fn can_connect_fence(block: Block) -> bool {
matches!(block, Block::Fence { .. } matches!(
| Block::SpruceFence { .. } block,
| Block::BirchFence { .. } Block::Fence { .. }
| Block::JungleFence { .. } | Block::SpruceFence { .. }
| Block::DarkOakFence { .. } | Block::BirchFence { .. }
| Block::AcaciaFence { .. } | Block::JungleFence { .. }
| Block::FenceGate { .. } | Block::DarkOakFence { .. }
| Block::SpruceFenceGate { .. } | Block::AcaciaFence { .. }
| Block::BirchFenceGate { .. } | Block::FenceGate { .. }
| Block::JungleFenceGate { .. } | Block::SpruceFenceGate { .. }
| Block::DarkOakFenceGate { .. } | Block::BirchFenceGate { .. }
| Block::AcaciaFenceGate { .. }) | Block::JungleFenceGate { .. }
| Block::DarkOakFenceGate { .. }
| Block::AcaciaFenceGate { .. }
)
} }
fn can_connect_glasspane(block: Block) -> bool { fn can_connect_glasspane(block: Block) -> bool {
matches!(block, Block::Glass { .. } matches!(
| Block::StainedGlass { .. } block,
| Block::GlassPane { .. } Block::Glass { .. }
| Block::StainedGlassPane { .. }) | Block::StainedGlass { .. }
| Block::GlassPane { .. }
| Block::StainedGlassPane { .. }
)
} }
fn can_connect_redstone<W: WorldAccess>(world: &W, pos: Position, dir: Direction) -> RedstoneSide { fn can_connect_redstone<W: WorldAccess>(world: &W, pos: Position, dir: Direction) -> RedstoneSide {
@ -6198,7 +6210,12 @@ fn door_collision(facing: Direction, hinge: Side, open: bool) -> Vec<Aabb3<f64>>
} }
fn update_repeater_state<W: WorldAccess>(world: &W, pos: Position, facing: Direction) -> bool { fn update_repeater_state<W: WorldAccess>(world: &W, pos: Position, facing: Direction) -> bool {
let f = |dir| matches!(world.get_block(pos.shift(dir)), Block::RepeaterPowered { .. }); let f = |dir| {
matches!(
world.get_block(pos.shift(dir)),
Block::RepeaterPowered { .. }
)
};
f(facing.clockwise()) || f(facing.counter_clockwise()) f(facing.clockwise()) || f(facing.counter_clockwise())
} }