Skip to content

Commit

Permalink
Fix compilation with Rust 1.76.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Nov 25, 2024
1 parent 6385e0b commit 60d58b9
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vello/src/debug/renderer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2023 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use super::DebugLayers;
use crate::{
debug::validate::{validate_line_soup, LineEndpoint},
Expand Down
4 changes: 4 additions & 0 deletions vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
clippy::match_same_arms
)]

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

mod debug;
mod recording;
mod render;
Expand Down
4 changes: 4 additions & 0 deletions vello/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

//! Take an encoded scene and create a graph to render it
// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use crate::recording::{BufferProxy, ImageFormat, ImageProxy, Recording, ResourceProxy};
use crate::shaders::FullShaders;
use crate::{AaConfig, RenderParams};
Expand Down
4 changes: 4 additions & 0 deletions vello_encoding/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2023 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use crate::SegmentCount;

use super::{
Expand Down
4 changes: 4 additions & 0 deletions vello_encoding/src/path.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2022 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use bytemuck::{Pod, Zeroable};
use peniko::kurbo::{Cap, Join, Shape, Stroke};
use peniko::Fill;
Expand Down
4 changes: 4 additions & 0 deletions vello_encoding/src/resolve.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2022 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use bytemuck::{Pod, Zeroable};

use super::{DrawTag, Encoding, PathTag, StreamOffsets, Style, Transform};
Expand Down
4 changes: 4 additions & 0 deletions vello_shaders/src/cpu/flatten.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright 2023 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense

// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that
#[allow(unused_imports)]
use core::mem::size_of;

use std::f32::consts::FRAC_1_SQRT_2;

use super::{
Expand Down

0 comments on commit 60d58b9

Please sign in to comment.