Skip to content
Snippets Groups Projects
Commit bab28033 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

refactor(config): Use From over Into for IndexStrategy

parent 851c5af7
No related branches found
Tags 1.5.5
No related merge requests found
...@@ -261,9 +261,9 @@ pub enum CompressionConfig { ...@@ -261,9 +261,9 @@ pub enum CompressionConfig {
Gzip, Gzip,
} }
impl Into<IndexStrategy> for IndexStrategyConfig { impl From<IndexStrategyConfig> for IndexStrategy {
fn into(self) -> IndexStrategy { fn from(config: IndexStrategyConfig) -> Self {
match self { match config {
IndexStrategyConfig::AlwaysShowListing => IndexStrategy::AlwaysShowListing { IndexStrategyConfig::AlwaysShowListing => IndexStrategy::AlwaysShowListing {
renderer: Arc::new(default_listing_renderer), renderer: Arc::new(default_listing_renderer),
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment