perf: use mmap for reading ini config files

This commit is contained in:
Michael Aaron Murphy 2025-04-03 14:26:51 +02:00
parent 09a76900a6
commit 32975f8f05
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
4 changed files with 28 additions and 16 deletions

View file

@ -127,8 +127,9 @@ mod test {
#[test]
fn should_get_theme_parents() {
for theme in THEMES.get("Arc").unwrap() {
let file = crate::theme::read_ini_theme(&theme.index);
let parents = theme.inherits(&file);
let file = crate::theme::read_ini_theme(&theme.index).ok().unwrap();
let file = std::str::from_utf8(file.as_ref()).ok().unwrap();
let parents = theme.inherits(file);
assert_that!(parents).does_not_contain("hicolor");