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.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs
index 39b3813..f46ae13 100644
--- a/src/file/format/mod.rs
+++ b/src/file/format/mod.rs
@@ -72,22 +72,22 @@ 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)
#[doc(hidden)]
#[allow(unused_variables)]
pub fn parse(
- &self,
+ self,
uri: Option<&String>,
text: &str,
- ) -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> {
- match *self {
+ ) -> Result<HashMap<String, Value>, Box<dyn Error + Send + Sync>> {
+ match self {
#[cfg(feature = "toml")]
FileFormat::Toml => toml::parse(uri, text),