diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 67818f2..dd86b74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,7 +11,7 @@ jobs: uses: actions-rs/toolchain@v1 with: # TODO: refactor toolchain version - toolchain: 1.49.0 + toolchain: 1.53.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.49.0 + toolchain: 1.53.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.49.0 + toolchain: 1.53.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.49.0 + toolchain: 1.53.0 components: clippy, rustfmt default: true - name: Install wasm-pack diff --git a/README.md b/README.md index 55a44d6..7e04262 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?r ## Dependencies -Requires Rust stable version 1.49.0 or newer. +Requires Rust stable version 1.53.0 or newer. **Debian/Ubuntu** diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index fd996b9..4fc10fa 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -5883,47 +5883,53 @@ mod tests { } fn can_burn(world: &W, pos: Position) -> bool { - matches!(world.get_block(pos), Block::Planks { .. } - | Block::DoubleWoodenSlab { .. } - | Block::WoodenSlab { .. } - | Block::FenceGate { .. } - | Block::SpruceFenceGate { .. } - | Block::BirchFenceGate { .. } - | Block::JungleFenceGate { .. } - | Block::DarkOakFenceGate { .. } - | Block::AcaciaFenceGate { .. } - | Block::Fence { .. } - | Block::SpruceFence { .. } - | Block::BirchFence { .. } - | Block::JungleFence { .. } - | Block::DarkOakFence { .. } - | Block::AcaciaFence { .. } - | Block::OakStairs { .. } - | Block::BirchStairs { .. } - | Block::SpruceStairs { .. } - | Block::JungleStairs { .. } - | Block::AcaciaStairs { .. } - | Block::DarkOakStairs { .. } - | Block::Log { .. } - | Block::Log2 { .. } - | Block::Leaves { .. } - | Block::Leaves2 { .. } - | Block::BookShelf { .. } - | Block::TNT { .. } - | Block::TallGrass { .. } - | Block::DoublePlant { .. } - | Block::YellowFlower { .. } - | Block::RedFlower { .. } - | Block::DeadBush { .. } - | Block::Wool { .. } - | Block::Vine { .. } - | Block::CoalBlock { .. } - | Block::HayBlock { .. } - | Block::Carpet { .. }) + matches!( + world.get_block(pos), + Block::Planks { .. } + | Block::DoubleWoodenSlab { .. } + | Block::WoodenSlab { .. } + | Block::FenceGate { .. } + | Block::SpruceFenceGate { .. } + | Block::BirchFenceGate { .. } + | Block::JungleFenceGate { .. } + | Block::DarkOakFenceGate { .. } + | Block::AcaciaFenceGate { .. } + | Block::Fence { .. } + | Block::SpruceFence { .. } + | Block::BirchFence { .. } + | Block::JungleFence { .. } + | Block::DarkOakFence { .. } + | Block::AcaciaFence { .. } + | Block::OakStairs { .. } + | Block::BirchStairs { .. } + | Block::SpruceStairs { .. } + | Block::JungleStairs { .. } + | Block::AcaciaStairs { .. } + | Block::DarkOakStairs { .. } + | Block::Log { .. } + | Block::Log2 { .. } + | Block::Leaves { .. } + | Block::Leaves2 { .. } + | Block::BookShelf { .. } + | Block::TNT { .. } + | Block::TallGrass { .. } + | Block::DoublePlant { .. } + | Block::YellowFlower { .. } + | Block::RedFlower { .. } + | Block::DeadBush { .. } + | Block::Wool { .. } + | Block::Vine { .. } + | Block::CoalBlock { .. } + | Block::HayBlock { .. } + | Block::Carpet { .. } + ) } fn is_snowy(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 bool, W: WorldAccess>( @@ -5945,25 +5951,31 @@ fn can_connect bool, W: WorldAccess>(world: &W, pos: Position, f } fn can_connect_fence(block: Block) -> bool { - matches!(block, Block::Fence { .. } - | Block::SpruceFence { .. } - | Block::BirchFence { .. } - | Block::JungleFence { .. } - | Block::DarkOakFence { .. } - | Block::AcaciaFence { .. } - | Block::FenceGate { .. } - | Block::SpruceFenceGate { .. } - | Block::BirchFenceGate { .. } - | Block::JungleFenceGate { .. } - | Block::DarkOakFenceGate { .. } - | Block::AcaciaFenceGate { .. }) + matches!( + block, + Block::Fence { .. } + | Block::SpruceFence { .. } + | Block::BirchFence { .. } + | Block::JungleFence { .. } + | Block::DarkOakFence { .. } + | Block::AcaciaFence { .. } + | Block::FenceGate { .. } + | Block::SpruceFenceGate { .. } + | Block::BirchFenceGate { .. } + | Block::JungleFenceGate { .. } + | Block::DarkOakFenceGate { .. } + | Block::AcaciaFenceGate { .. } + ) } fn can_connect_glasspane(block: Block) -> bool { - matches!(block, Block::Glass { .. } - | Block::StainedGlass { .. } - | Block::GlassPane { .. } - | Block::StainedGlassPane { .. }) + matches!( + block, + Block::Glass { .. } + | Block::StainedGlass { .. } + | Block::GlassPane { .. } + | Block::StainedGlassPane { .. } + ) } fn can_connect_redstone(world: &W, pos: Position, dir: Direction) -> RedstoneSide { @@ -6198,7 +6210,12 @@ fn door_collision(facing: Direction, hinge: Side, open: bool) -> Vec> } fn update_repeater_state(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()) }