Switch to cursor_split feature
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux

The `cursor_remaining` feature was replaced by that:
https://github.com/rust-lang/rust/pull/109174
This commit is contained in:
Lucas Schwiderski 2024-08-08 15:18:01 +02:00
parent ff6fd948c8
commit ea2368c532
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8
2 changed files with 5 additions and 2 deletions

View file

@ -535,6 +535,8 @@ impl Texture {
.to_binary(&mut out_data)
.wrap_err("Failed to write DX10 header")?;
// If there is stream data, we build the mipmap data from it.
// If not, we take whatever is left in the bundle file.
if let Some(stream) = &self.stream {
let data = Self::reorder_stream_mipmap(
stream,
@ -549,8 +551,9 @@ impl Texture {
.write_all(&data)
.wrap_err("Failed to write streamed mipmap data")?;
} else {
let (_, remaining) = data.split();
out_data
.write_all(data.remaining_slice())
.write_all(remaining)
.wrap_err("Failed to write texture data")?;
};

View file

@ -1,4 +1,4 @@
#![feature(cursor_remaining)]
#![feature(cursor_split)]
#![feature(test)]
mod binary;