From b09d57a1a649a13fdea247d0016e043d4eeff285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kot?= Date: Sat, 23 Oct 2021 17:16:52 +0200 Subject: Change FileExtensions (rename, make subtrait) --- examples/custom_format/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/custom_format/main.rs b/examples/custom_format/main.rs index c21bac2..eb62e45 100644 --- a/examples/custom_format/main.rs +++ b/examples/custom_format/main.rs @@ -1,4 +1,4 @@ -use config::{Config, File, FileExtensions, Format, Map, Value, ValueKind}; +use config::{Config, File, FileStoredFormat, Format, Map, Value, ValueKind}; fn main() { let config = Config::builder() @@ -43,8 +43,8 @@ impl Format for MyFormat { // As crazy as it seems for config sourced from a string, legacy demands its sacrifice // It is only required for File source, custom sources can use Format without caring for extensions static MY_FORMAT_EXT: Vec<&'static str> = vec![]; -impl FileExtensions for MyFormat { - fn extensions(&self) -> &'static [&'static str] { +impl FileStoredFormat for MyFormat { + fn file_extensions(&self) -> &'static [&'static str] { &MY_FORMAT_EXT } } -- cgit v1.2.3