Update to Rust 1.48 (#424)
* Update to Rust 1.48.0 * Fix clippy::single_char_push_str warnings * Fix clippy::manual_strip warnings
This commit is contained in:
parent
f3faae383e
commit
710a7732ef
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.47.0
|
toolchain: 1.48.0
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
default: true
|
default: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
|
@ -65,7 +65,7 @@ from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?r
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Requires Rust stable version 1.47.0 or newer.
|
Requires Rust stable version 1.48.0 or newer.
|
||||||
|
|
||||||
**Debian/Ubuntu**
|
**Debian/Ubuntu**
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ impl Registry {
|
||||||
out.push_str("#version 150\n");
|
out.push_str("#version 150\n");
|
||||||
out.push_str("#define ");
|
out.push_str("#define ");
|
||||||
out.push_str(define);
|
out.push_str(define);
|
||||||
out.push_str("\n");
|
out.push('\n');
|
||||||
self.get_internal(&mut out, name);
|
self.get_internal(&mut out, name);
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
@ -52,13 +52,13 @@ impl Registry {
|
||||||
fn get_internal(&self, out: &mut String, name: &str) {
|
fn get_internal(&self, out: &mut String, name: &str) {
|
||||||
let src = self.shaders.get(name).unwrap();
|
let src = self.shaders.get(name).unwrap();
|
||||||
for line in src.lines() {
|
for line in src.lines() {
|
||||||
if line.starts_with("#include ") {
|
if let Some(stripped) = line.strip_prefix("#include ") {
|
||||||
let inc = line["#include ".len()..].trim();
|
let inc = stripped.trim();
|
||||||
self.get_internal(out, inc);
|
self.get_internal(out, inc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
out.push_str(line);
|
out.push_str(line);
|
||||||
out.push_str("\n");
|
out.push('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1143,8 +1143,7 @@ impl TextureManager {
|
||||||
self.add_defaults();
|
self.add_defaults();
|
||||||
|
|
||||||
for name in map.keys() {
|
for name in map.keys() {
|
||||||
if name.starts_with("steven-dynamic:") {
|
if let Some(n) = name.strip_prefix("steven-dynamic:") {
|
||||||
let n = &name["steven-dynamic:".len()..];
|
|
||||||
let (width, height, data) = {
|
let (width, height, data) = {
|
||||||
let dynamic_texture = match self.dynamic_textures.get(n) {
|
let dynamic_texture = match self.dynamic_textures.get(n) {
|
||||||
Some(val) => val,
|
Some(val) => val,
|
||||||
|
@ -1332,7 +1331,7 @@ impl TextureManager {
|
||||||
|
|
||||||
let mut full_name = String::new();
|
let mut full_name = String::new();
|
||||||
full_name.push_str(plugin);
|
full_name.push_str(plugin);
|
||||||
full_name.push_str(":");
|
full_name.push(':');
|
||||||
full_name.push_str(name);
|
full_name.push_str(name);
|
||||||
|
|
||||||
let tex = Texture {
|
let tex = Texture {
|
||||||
|
@ -1372,7 +1371,7 @@ impl TextureManager {
|
||||||
|
|
||||||
let mut full_name = String::new();
|
let mut full_name = String::new();
|
||||||
full_name.push_str(plugin);
|
full_name.push_str(plugin);
|
||||||
full_name.push_str(":");
|
full_name.push(':');
|
||||||
full_name.push_str(name);
|
full_name.push_str(name);
|
||||||
|
|
||||||
let t = Texture {
|
let t = Texture {
|
||||||
|
|
Loading…
Reference in New Issue