Skip to content

Commit

Permalink
Remove the Clippy "-A clippy::manual-strip" override (#1619)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MinerSebas committed Mar 12, 2021
1 parent 8e3532e commit 8a9f475
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,10 @@ async fn load_buffers(
match buffer.source() {
gltf::buffer::Source::Uri(uri) => {
if uri.starts_with("data:") {
if uri.starts_with(OCTET_STREAM_URI) {
buffer_data.push(base64::decode(&uri[OCTET_STREAM_URI.len()..])?);
} else {
return Err(GltfError::BufferFormatUnsupported);
}
buffer_data.push(base64::decode(
uri.strip_prefix(OCTET_STREAM_URI)
.ok_or(GltfError::BufferFormatUnsupported)?,
)?);
} else {
// TODO: Remove this and add dep
let buffer_path = asset_path.parent().unwrap().join(uri);
Expand Down
1 change: 0 additions & 1 deletion docs/linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complex

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

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

Expand Down
3 changes: 1 addition & 2 deletions tools/ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ fn main() {

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

0 comments on commit 8a9f475

Please sign in to comment.