Skip to content

Commit

Permalink
Remove unnecessary uses for feature/map
Browse files Browse the repository at this point in the history
  • Loading branch information
David Orchard committed Aug 15, 2021
1 parent ea62693 commit 0e0ae2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/file/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// BUG: ? For some reason this doesn't do anything if I try and function scope this
#![allow(unused_mut)]

use std::collections::HashMap;
use std::error::Error;

use crate::map::MapImpl;
Expand Down Expand Up @@ -62,8 +63,8 @@ pub enum FileFormat {
lazy_static! {
#[doc(hidden)]
// #[allow(unused_mut)] ?
pub static ref ALL_EXTENSIONS: MapImpl<FileFormat, Vec<&'static str>> = {
let mut formats: MapImpl<FileFormat, Vec<_>> = MapImpl::new();
pub static ref ALL_EXTENSIONS: HashMap<FileFormat, Vec<&'static str>> = {
let mut formats: HashMap<FileFormat, Vec<_>> = HashMap::new();

#[cfg(feature = "toml")]
formats.insert(FileFormat::Toml, vec!["toml"]);
Expand Down
2 changes: 0 additions & 2 deletions tests/async_builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(feature = "preserve_order")]

use async_trait::async_trait;
use config::*;
use std::{env, fs, path, str::FromStr};
Expand Down
2 changes: 1 addition & 1 deletion tests/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(all(feature = "toml", feature = "preserve_order"))]
#![cfg(feature = "toml")]

extern crate config;

Expand Down

0 comments on commit 0e0ae2b

Please sign in to comment.