Skip to content

Commit 8a9f475

Browse files
committed
Remove the Clippy "-A clippy::manual-strip" override (#1619)
That override was added to support pre 1.45 Versions of Rust, but Bevy requires currently the latest stable rust release. This means that the reason for the override doesn't apply anymore.
1 parent 8e3532e commit 8a9f475

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

crates/bevy_gltf/src/loader.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,10 @@ async fn load_buffers(
484484
match buffer.source() {
485485
gltf::buffer::Source::Uri(uri) => {
486486
if uri.starts_with("data:") {
487-
if uri.starts_with(OCTET_STREAM_URI) {
488-
buffer_data.push(base64::decode(&uri[OCTET_STREAM_URI.len()..])?);
489-
} else {
490-
return Err(GltfError::BufferFormatUnsupported);
491-
}
487+
buffer_data.push(base64::decode(
488+
uri.strip_prefix(OCTET_STREAM_URI)
489+
.ok_or(GltfError::BufferFormatUnsupported)?,
490+
)?);
492491
} else {
493492
// TODO: Remove this and add dep
494493
let buffer_path = asset_path.parent().unwrap().join(uri);

docs/linters.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complex
1818

1919
* `-D warnings`: No warnings are allowed in the codebase.
2020
* `-A clippy::type_complexity`: type complexity must be ignored because we use huge templates for queries.
21-
* `-A clippy::manual-strip`: strip_prefix support was added in 1.45. We want to support earlier rust versions.
2221

2322
## [super-linter](https://github.com/github/super-linter)
2423

tools/ci/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ fn main() {
1313

1414
// See if clippy has any complaints.
1515
// - Type complexity must be ignored because we use huge templates for queries
16-
// - `-A clippy::manual-strip` strip_prefix support was added in 1.45
17-
cmd!("cargo clippy --workspace --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip")
16+
cmd!("cargo clippy --workspace --all-targets --all-features -- -D warnings -A clippy::type_complexity")
1817
.run()
1918
.expect("Please fix clippy errors in output above.");
2019
}

0 commit comments

Comments
 (0)