From 63f5166e3dcba0c884f112848a4a4e7886ca1b99 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 27 May 2026 09:19:25 +0000 Subject: refactor: Tighten naming, drop dead paths, reject empty names --- src/cache.gleam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/cache.gleam') diff --git a/src/cache.gleam b/src/cache.gleam index 7e4ff21..7cd40a5 100644 --- a/src/cache.gleam +++ b/src/cache.gleam @@ -2,7 +2,6 @@ import gleam/bit_array import gleam/dict.{type Dict} import gleam/int import gleam/list -import gleam/option.{type Option} import gleam/result import gleam/string import image @@ -85,8 +84,7 @@ fn load_cached_image(path) { } } -pub fn get_image(cache, theme, digit) -> Option(CachedImage) { +pub fn get_image(cache, theme, digit) -> Result(CachedImage, Nil) { dict.get(cache, theme) |> result.then(fn(theme_images) { dict.get(theme_images, digit) }) - |> option.from_result } -- cgit v1.2.3