Skip to content

Commit

Permalink
Update to Rust 1.59.0 (#718)
Browse files Browse the repository at this point in the history
* Update to Rust 1.59.0

* Fix clippy::single_char_pattern in console, ui/logo

* Fix clippy::needless_late_init in load_block_entities
  • Loading branch information
iceiix authored Aug 28, 2022
1 parent 303783f commit bbbe58a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
# TODO: refactor toolchain version
toolchain: 1.58.1
toolchain: 1.59.0
components: clippy, rustfmt
default: true
- name: Install dependencies
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.1
toolchain: 1.59.0
components: clippy, rustfmt
default: true
- name: Build binary
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.1
toolchain: 1.59.0
components: clippy, rustfmt
default: true
- name: Build binary
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
# TODO: refactor toolchain version
toolchain: 1.58.1
toolchain: 1.59.0
components: clippy, rustfmt
default: true
- name: Install wasm-pack
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stevenarella"
version = "0.0.1"
authors = [ "Thinkofdeath <[email protected]>", "iceiix <[email protected]>" ]
edition = "2021"
rust-version = "1.58.1"
rust-version = "1.59.0"
resolver = "2"
description = "Multi-protocol multi-platform Minecraft-compatible client"
repository = "https://github.com/iceiix/stevenarella"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?r

## Dependencies

Requires Rust stable version 1.58.1 or newer.
Requires Rust stable version 1.59.0 or newer.

**Debian/Ubuntu**

Expand Down
2 changes: 1 addition & 1 deletion src/console/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ impl Console {
}
}

let mut file = &record.file().unwrap_or("").replace("\\", "/")[..];
let mut file = &record.file().unwrap_or("").replace('\\', "/")[..];
if let Some(pos) = file.rfind("src/") {
file = &file[pos + 4..];
}
Expand Down
7 changes: 3 additions & 4 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1947,13 +1947,12 @@ impl Server {
let z = block_entity.1.get("z").unwrap().as_int().unwrap();
if let Some(tile_id) = block_entity.1.get("id") {
let tile_id = tile_id.as_str().unwrap();
let action;
match tile_id {
let action = match tile_id {
// Fake a sign update
"Sign" => action = 9,
"Sign" => 9,
// Not something we care about, so break the loop
_ => continue,
}
};
self.on_block_entity_update_u8(packet::play::clientbound::UpdateBlockEntity_u8 {
location: Position::new(x, y, z),
action,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/logo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl Logo {
let mut texts = String::new();
file.read_to_string(&mut texts).unwrap();
for line in texts.lines() {
text_strings.push(line.to_owned().replace("\r", ""));
text_strings.push(line.to_owned().replace('\r', ""));
}
}
let mut r: rand_pcg::Pcg32 =
Expand Down

0 comments on commit bbbe58a

Please sign in to comment.