Skip to content

Commit

Permalink
chore: use hashmap to transfer config in create_with_config method (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuston authored Jan 13, 2024
1 parent d082faa commit d2e3580
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/hdfs-native/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::VecDeque;
use std::collections::{HashMap, VecDeque};
use std::path::{Path, PathBuf};
use std::sync::Arc;

Expand Down Expand Up @@ -156,9 +156,9 @@ impl Client {
Self::with_config(&parsed_url, Configuration::new()?)
}

pub fn new_with_config(url: &str, configuration: Configuration) -> Result<Self> {
pub fn new_with_config(url: &str, config: HashMap<String, String>) -> Result<Self> {
let parsed_url = Url::parse(url)?;
Self::with_config(&parsed_url, configuration)
Self::with_config(&parsed_url, Configuration::from(config))
}

fn with_config(url: &Url, config: Configuration) -> Result<Self> {
Expand Down

0 comments on commit d2e3580

Please sign in to comment.