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