summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Nikolai Vazquez <nikvzqz@gmail.com>2019-11-29 21:24:52 -0500
committerLibravatar Nikolai Vazquez <nikvzqz@gmail.com>2019-11-29 21:24:52 -0500
commit267e242238fab0aba14fb4c2e27269ce3a3e3951 (patch)
tree6957be383f221ecc444ac50cdcbdfd45f6374349 /wgpu/src/renderer.rs
parent811d8b90d71c26100f0933217f5474e090fbf17c (diff)
downloadiced-267e242238fab0aba14fb4c2e27269ce3a3e3951.tar.gz
iced-267e242238fab0aba14fb4c2e27269ce3a3e3951.tar.bz2
iced-267e242238fab0aba14fb4c2e27269ce3a3e3951.zip
Make many functions `const`
The point is to set up repeated components or boilerplate before their use sites. The majority of these make sense as `const`. However, some functions such as those regarding state may not make sense as `const`.
Diffstat (limited to '')
-rw-r--r--wgpu/src/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs
index f27a4b8a..da2c0d8c 100644
--- a/wgpu/src/renderer.rs
+++ b/wgpu/src/renderer.rs
@@ -35,7 +35,7 @@ struct Layer<'a> {
}
impl<'a> Layer<'a> {
- pub fn new(bounds: Rectangle<u32>, offset: Vector<u32>) -> Self {
+ pub const fn new(bounds: Rectangle<u32>, offset: Vector<u32>) -> Self {
Self {
bounds,
offset,