summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-03-06 03:47:40 +0100
committerLibravatar GitHub <noreply@github.com>2020-03-06 03:47:40 +0100
commitd817fe8e144e8d81979d8f8c8dfb95da8b28e3e9 (patch)
treee8d336f35bc9e747f6d6a65d8c751ed261566e98 /core
parent3062c190bbcc82f30eaabc086a4e5014e320c8b6 (diff)
parentf81827c151eba868ab17f35d21a654d48125d0bf (diff)
downloadiced-d817fe8e144e8d81979d8f8c8dfb95da8b28e3e9.tar.gz
iced-d817fe8e144e8d81979d8f8c8dfb95da8b28e3e9.tar.bz2
iced-d817fe8e144e8d81979d8f8c8dfb95da8b28e3e9.zip
Merge pull request #91 from nvzqz/const-all-the-things
Make many functions `const`
Diffstat (limited to 'core')
-rw-r--r--core/src/vector.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/vector.rs b/core/src/vector.rs
index 1c09ee3e..4c1cbfab 100644
--- a/core/src/vector.rs
+++ b/core/src/vector.rs
@@ -16,7 +16,7 @@ impl<T> Vector<T> {
/// Creates a new [`Vector`] with the given components.
///
/// [`Vector`]: struct.Vector.html
- pub fn new(x: T, y: T) -> Self {
+ pub const fn new(x: T, y: T) -> Self {
Self { x, y }
}
}