1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-11 07:42:35 +01:00

Add syntaxes and themes method

This commit is contained in:
sharkdp
2020-04-22 22:05:54 +02:00
committed by David Peter
parent cba9df746e
commit 53a973e9dd
4 changed files with 30 additions and 3 deletions

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 {