summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRadosław Kot <rdkt13@gmail.com>2021-10-23 17:16:52 +0200
committerRadosław Kot <rdkt13@gmail.com>2021-10-23 17:16:52 +0200
commitb09d57a1a649a13fdea247d0016e043d4eeff285 (patch)
tree696fc33eac5b235bf8404a6874dcc435035b39fc /examples
parente0df1523a4569742ac10636a8cb975d11b453d54 (diff)
Change FileExtensions (rename, make subtrait)
Diffstat (limited to 'examples')
-rw-r--r--examples/custom_format/main.rs6
1 files changed, 3 insertions, 3 deletions
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
}
}