summaryrefslogtreecommitdiffstats
path: root/src/file/format/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/format/mod.rs')
-rw-r--r--src/file/format/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs
index 47b856d..d1a9a71 100644
--- a/src/file/format/mod.rs
+++ b/src/file/format/mod.rs
@@ -6,7 +6,7 @@ use std::collections::HashMap;
use std::error::Error;
use crate::map::Map;
-use crate::{value::Value, Format};
+use crate::{value::Value, Format, file::extension::FileExtensions};
#[cfg(feature = "toml")]
mod toml;
@@ -84,11 +84,11 @@ lazy_static! {
impl FileFormat {
// TODO: pub(crate)
#[doc(hidden)]
- pub fn extensions(self) -> &'static Vec<&'static str> {
+ pub fn extensions(&self) -> &'static Vec<&'static str> {
// It should not be possible for this to fail
// A FileFormat would need to be declared without being added to the
// ALL_EXTENSIONS map.
- ALL_EXTENSIONS.get(&self).unwrap()
+ ALL_EXTENSIONS.get(self).unwrap()
}
// TODO: pub(crate)
@@ -126,7 +126,7 @@ impl Format for FileFormat {
&self,
uri: Option<&String>,
text: &str,
- ) -> Result<HashMap<String, Value>, Box<dyn Error + Send + Sync>> {
+ ) -> Result<Map<String, Value>, Box<dyn Error + Send + Sync>> {
self.parse(uri, text)
}
}