From 267e242238fab0aba14fb4c2e27269ce3a3e3951 Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Fri, 29 Nov 2019 21:24:52 -0500 Subject: 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`. --- wgpu/src/renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wgpu/src/renderer.rs') 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, offset: Vector) -> Self { + pub const fn new(bounds: Rectangle, offset: Vector) -> Self { Self { bounds, offset, -- cgit