Skip to content

Commit

Permalink
Reduce size of executable
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster committed May 19, 2019
1 parent 2e1f9c9 commit 78583cf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ walkdir = "2"
reqwest = "0.9.16"
html2md = "0.2.9"
lazy_static = "1.3.0"

[profile.release]
lto = true
4 changes: 2 additions & 2 deletions src/completion/latex/kernel_primitives.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const KERNEL_COMMANDS: &'static [&'static str] = &[
pub static KERNEL_COMMANDS: &'static [&'static str] = &[
"!",
"'",
"#",
Expand Down Expand Up @@ -1929,7 +1929,7 @@ pub const KERNEL_COMMANDS: &'static [&'static str] = &[
"~",
];

pub const KERNEL_ENVIRONMENTS: &'static [&'static str] = &[
pub static KERNEL_ENVIRONMENTS: &'static [&'static str] = &[
"abstract",
"array",
"center",
Expand Down
2 changes: 1 addition & 1 deletion src/syntax/latex/analysis/citation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl LatexCitation {
}
}

pub const CITATION_COMMANDS: &'static [&'static str] = &[
pub static CITATION_COMMANDS: &'static [&'static str] = &[
"\\cite",
"\\cite*",
"\\Cite",
Expand Down
2 changes: 1 addition & 1 deletion src/syntax/latex/analysis/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl LatexEnvironment {
}
}

pub const ENVIRONMENT_COMMANDS: &'static [&'static str] = &["\\begin", "\\end"];
pub static ENVIRONMENT_COMMANDS: &'static [&'static str] = &["\\begin", "\\end"];

#[cfg(test)]
mod tests {
Expand Down
2 changes: 1 addition & 1 deletion src/syntax/latex/analysis/equation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl LatexEquation {
}
}

pub const EQUATION_COMMANDS: &'static [&'static str] = &["\\[", "\\]"];
pub static EQUATION_COMMANDS: &'static [&'static str] = &["\\[", "\\]"];

#[cfg(test)]
mod tests {
Expand Down
4 changes: 2 additions & 2 deletions src/syntax/latex/analysis/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ impl LatexLabel {
}
}

pub const LABEL_DEFINITION_COMMANDS: &'static [&'static str] = &["\\label"];
pub static LABEL_DEFINITION_COMMANDS: &'static [&'static str] = &["\\label"];

pub const LABEL_REFERENCE_COMMANDS: &'static [&'static str] = &["\\ref", "\\autoref", "\\eqref"];
pub static LABEL_REFERENCE_COMMANDS: &'static [&'static str] = &["\\ref", "\\autoref", "\\eqref"];

#[cfg(test)]
mod tests {
Expand Down
2 changes: 1 addition & 1 deletion src/syntax/latex/analysis/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl LatexSection {
}
}

pub const SECTION_COMMANDS: &'static [&'static str] = &[
pub static SECTION_COMMANDS: &'static [&'static str] = &[
"\\chapter",
"\\chapter*",
"\\section",
Expand Down

0 comments on commit 78583cf

Please sign in to comment.