summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar shan <shankern@protonmail.com>2022-10-07 13:21:32 -0700
committerLibravatar shan <shankern@protonmail.com>2022-10-07 13:21:32 -0700
commit215e6c95be7370bdd29c75b904463f06f942b7c0 (patch)
tree75c84dc0656e8dfd744b4202e80399ac86055155 /graphics/src
parent3e600fe7754645ffdfca595060273b1e96c9a162 (diff)
downloadiced-215e6c95be7370bdd29c75b904463f06f942b7c0.tar.gz
iced-215e6c95be7370bdd29c75b904463f06f942b7c0.tar.bz2
iced-215e6c95be7370bdd29c75b904463f06f942b7c0.zip
More import adjusting.
Diffstat (limited to 'graphics/src')
-rw-r--r--graphics/src/layer.rs14
-rw-r--r--graphics/src/layer/mesh.rs12
2 files changed, 13 insertions, 13 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs
index 08f07c0e..56a42a9d 100644
--- a/graphics/src/layer.rs
+++ b/graphics/src/layer.rs
@@ -244,16 +244,4 @@ impl<'a> Layer<'a> {
}
}
}
-}
-
-/// Returns the number of total vertices & total indices of all [`Mesh`]es.
-pub fn attribute_count_of<'a>(meshes: &'a [Mesh<'a>]) -> (usize, usize) {
- meshes
- .iter()
- .map(|Mesh { buffers, .. }| {
- (buffers.vertices.len(), buffers.indices.len())
- })
- .fold((0, 0), |(total_v, total_i), (v, i)| {
- (total_v + v, total_i + i)
- })
-}
+} \ No newline at end of file
diff --git a/graphics/src/layer/mesh.rs b/graphics/src/layer/mesh.rs
index 8a6b1d70..0946317e 100644
--- a/graphics/src/layer/mesh.rs
+++ b/graphics/src/layer/mesh.rs
@@ -37,3 +37,15 @@ impl <'a> Into<Style> for Gradient {
}
}
}
+
+/// Returns the number of total vertices & total indices of all [`Mesh`]es.
+pub fn attribute_count_of<'a>(meshes: &'a [Mesh<'a>]) -> (usize, usize) {
+ meshes
+ .iter()
+ .map(|Mesh { buffers, .. }| {
+ (buffers.vertices.len(), buffers.indices.len())
+ })
+ .fold((0, 0), |(total_v, total_i), (v, i)| {
+ (total_v + v, total_i + i)
+ })
+}