-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9c0e66
commit bb3a9d4
Showing
3 changed files
with
5 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
use std::collections::{BTreeMap, HashMap}; | ||
|
||
use serde::{Serialize, Serializer}; | ||
|
||
#[cfg_attr(not(target_os = "windows"), allow(unused))] | ||
pub fn ordered_map<S, V>(value: &HashMap<String, V>, serializer: S) -> Result<S::Ok, S::Error> | ||
where | ||
V: Serialize, | ||
S: Serializer, | ||
{ | ||
let ordered: BTreeMap<_, _> = value.iter().collect(); | ||
ordered.serialize(serializer) | ||
} | ||
|
||
pub const fn default_true() -> bool { | ||
true | ||
} |