From bab2803365be1077ebfe84a8030a02d06446f128 Mon Sep 17 00:00:00 2001 From: Eduardo Trujillo <ed@chromabits.com> Date: Sat, 16 Jan 2021 12:02:59 -0800 Subject: [PATCH] refactor(config): Use From over Into for IndexStrategy --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index f5f7270..f11d271 100644 --- a/src/config.rs +++ b/src/config.rs @@ -261,9 +261,9 @@ pub enum CompressionConfig { Gzip, } -impl Into<IndexStrategy> for IndexStrategyConfig { - fn into(self) -> IndexStrategy { - match self { +impl From<IndexStrategyConfig> for IndexStrategy { + fn from(config: IndexStrategyConfig) -> Self { + match config { IndexStrategyConfig::AlwaysShowListing => IndexStrategy::AlwaysShowListing { renderer: Arc::new(default_listing_renderer), }, -- GitLab