aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/register.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-10-24 08:28:29 +0000
committerBlaž Hrastnik2021-10-24 08:28:29 +0000
commitcee7ad781e5f6de249d728425a6283a26bb62dc3 (patch)
tree94e2b87ec0a4677a3f85a951519a7b4263bbef54 /helix-core/src/register.rs
parentc913bade0a3b0edaaf87e1a5e795edc951cead78 (diff)
Mark a few functions as `const`
Diffstat (limited to 'helix-core/src/register.rs')
-rw-r--r--helix-core/src/register.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/register.rs b/helix-core/src/register.rs
index c3e6652e..c5444eb7 100644
--- a/helix-core/src/register.rs
+++ b/helix-core/src/register.rs
@@ -7,7 +7,7 @@ pub struct Register {
}
impl Register {
- pub fn new(name: char) -> Self {
+ pub const fn new(name: char) -> Self {
Self {
name,
values: Vec::new(),
@@ -18,7 +18,7 @@ impl Register {
Self { name, values }
}
- pub fn name(&self) -> char {
+ pub const fn name(&self) -> char {
self.name
}