diff options
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/register.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/helix-core/src/register.rs b/helix-core/src/register.rs index 0be0ce89..0176d23e 100644 --- a/helix-core/src/register.rs +++ b/helix-core/src/register.rs @@ -6,16 +6,15 @@ use std::{collections::HashMap, sync::RwLock}; static REGISTRY: Lazy<RwLock<HashMap<char, Vec<String>>>> = Lazy::new(|| RwLock::new(HashMap::new())); -pub fn get(register: char) -> Option<Vec<String>> { +/// Read register values. +pub fn get(register_name: char) -> Option<Vec<String>> { let registry = REGISTRY.read().unwrap(); - - // TODO: no cloning - registry.get(®ister).cloned() + registry.get(®ister_name).cloned() // TODO: no cloning } +/// Read register values. // restoring: bool -pub fn set(register: char, values: Vec<String>) { +pub fn set(register_name: char, values: Vec<String>) { let mut registry = REGISTRY.write().unwrap(); - - registry.insert(register, values); + registry.insert(register_name, values); } |