<NME> options.rs
<BEF> /// Editor options.
pub struct Options {
    /// Autoindent on line breaks?
    pub autoindent: bool,
    /// Debug mode.
    pub debug: bool,
    /// Highlight.
    pub highlight: bool,
    /// Line marker (dimmed background of the current line).
    pub line_marker: bool,
    /// enables read-only mode
    pub readonly: bool,
    /// Enable linenumbers
    pub line_numbers: bool,
}

impl Options {
    /// Create new default options
    pub fn new() -> Self {
        Options {
            autoindent: true,
            debug: true, // TODO: Let this be `true` only in debug compilation cfg
            highlight: true,
            line_marker: true,
            readonly: false,
        match name {
            "autoindent" | "ai" => Some(&mut self.autoindent),
            "debug" | "debug_mode" => Some(&mut self.debug),
            "hightlight" | "hl" => Some(&mut self.highlight),
            "line_marker" | "linemarker" | "linemark" | "lm" => Some(&mut self.line_marker),
            _ => None,
        }
            "autoindent" | "ai" => Some(&mut self.autoindent),
            "debug" | "debug_mode" => Some(&mut self.debug),
            "highlight" | "hl" => Some(&mut self.highlight),
            "line_marker" | "linemarker" | "linemark" | "lm" => Some(&mut self.line_marker),
        match name {
            "autoindent" | "ai" => Some(self.autoindent),
            "debug" | "debug_mode" => Some(self.debug),
            "hightlight" | "hl" => Some(self.highlight),
            "line_marker" | "linemarker" | "linemark" | "lm" => Some(self.line_marker),
            _ => None,
        }
    pub fn get(&self, name: &str) -> Option<bool> {
        match name {
            "autoindent" | "ai" => Some(self.autoindent),
            "debug" | "debug_mode" => Some(self.debug),
            "highlight" | "hl" => Some(self.highlight),
            "line_marker" | "linemarker" | "linemark" | "lm" => Some(self.line_marker),
            "readonly" | "ro" => Some(self.readonly),
            "line_numbers" | "ln" => Some(self.line_numbers),
            _ => None,
        }
    }

    /// Set a given option (mark it as active)
    pub fn set(&mut self, name: &str) -> Result<(), ()> {
        match self.get_mut(name) {
            Some(x) => {
                *x = true;
                Ok(())
            }
            None => Err(()),
        }
    }
    /// Unset a given option (mark it as inactive)
    pub fn unset(&mut self, name: &str) -> Result<(), ()> {
        match self.get_mut(name) {
            Some(x) => {
                *x = false;
                Ok(())
            }
            None => Err(()),
        }
    }
    /// Toggle a given option
    pub fn toggle(&mut self, name: &str) -> Result<(), ()> {
        match self.get_mut(name) {
            Some(x) => {
                *x = !*x;
                Ok(())
            }
            None => Err(()),
        }
    }
}

<MSG> Merge pull request #55 from rjgoldsborough/hightlight-option-typo

fixing highlight option typo
<DFF> @@ -26,7 +26,7 @@ impl Options {
         match name {
             "autoindent" | "ai" => Some(&mut self.autoindent),
             "debug" | "debug_mode" => Some(&mut self.debug),
-            "hightlight" | "hl" => Some(&mut self.highlight),
+            "highlight" | "hl" => Some(&mut self.highlight),
             "line_marker" | "linemarker" | "linemark" | "lm" => Some(&mut self.line_marker),
             _ => None,
         }
@@ -37,7 +37,7 @@ impl Options {
         match name {
             "autoindent" | "ai" => Some(self.autoindent),
             "debug" | "debug_mode" => Some(self.debug),
-            "hightlight" | "hl" => Some(self.highlight),
+            "highlight" | "hl" => Some(self.highlight),
             "line_marker" | "linemarker" | "linemark" | "lm" => Some(self.line_marker),
             _ => None,
         }

{'addition_count': 2, 'commit_subject': 'Merge pull request #55 from rjgoldsborough/hightlight-option-typo', 'deletion_count': 2, 'file_extension': '.rs', 'lang': 'rs', 'license': 'mit', 'repo_name': 'redox-os/sodium'}