From f0dd5443944478849cde4cb8e84f544f7cf63a6e Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 29 Jan 2023 19:04:25 +0000 Subject: [PATCH 1/2] make vector2d new const --- agb-fixnum/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb-fixnum/src/lib.rs b/agb-fixnum/src/lib.rs index 85745b61..43ad8698 100644 --- a/agb-fixnum/src/lib.rs +++ b/agb-fixnum/src/lib.rs @@ -980,7 +980,7 @@ impl Vector2D { /// assert_eq!(v.x, 1); /// assert_eq!(v.y, 2); /// ``` - pub fn new(x: T, y: T) -> Self { + pub const fn new(x: T, y: T) -> Self { Vector2D { x, y } } From 650702ed4efc90f08fe1220218b9de4cd7c10fc3 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 29 Jan 2023 19:06:00 +0000 Subject: [PATCH 2/2] modify changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d53b3977..53ec8c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Made Vector2D::new a const function + ### Fixed - Alpha channel is now considered by `include_gfx!()` even when `transparent_colour` is absent.