datafusion-table-providers 0.12.0

Extend the capabilities of DataFusion to support additional data sources via implementations of the `TableProvider` trait.
1
2
3
4
5
6
7
8
9
10
11
use secrecy::SecretString;
use std::collections::HashMap;

#[must_use]
pub fn to_secret_map<S: ::std::hash::BuildHasher + ::std::default::Default>(
    map: HashMap<String, String, S>,
) -> HashMap<String, SecretString, S> {
    map.into_iter()
        .map(|(k, v)| (k, SecretString::from(v)))
        .collect()
}