Add syntaxes and themes method

This commit is contained in:
sharkdp authored and David Peter committed 2020-04-22 23:55:28 +02:00
1 parent cba9df746e
commit 53a973e9dd
4 files changed
+30 -3

No files matched your search

+2 -2
View File
@@ -164,8 +164,8 @@ impl HighlightingAssets {
self.syntax_set.syntaxes()
}
pub fn themes(&self) -> impl Iterator<Item = &String> {
self.theme_set.themes.keys()
pub fn themes(&self) -> impl Iterator<Item = &str> {
self.theme_set.themes.keys().map(|s| s.as_ref())
}
pub(crate) fn get_theme(&self, theme: &str) -> &Theme {