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
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:
parent
ff6fd948c8
commit
ea2368c532
2 changed files with 5 additions and 2 deletions
|
@ -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")?;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![feature(cursor_remaining)]
|
||||
#![feature(cursor_split)]
|
||||
#![feature(test)]
|
||||
|
||||
mod binary;
|
||||
|
|
Loading…
Add table
Reference in a new issue