Skip to content

Commit ea03f64

Browse files
authored
fix: add a default constructor for the baseclient (#1603)
1 parent 462f94a commit ea03f64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tool_configuration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub enum TestStrategy {
4848
}
4949

5050
/// A client that can handle both secure and insecure connections
51-
#[derive(Clone)]
51+
#[derive(Clone, Default)]
5252
pub struct BaseClient {
5353
/// The standard client with SSL verification enabled
5454
client: ClientWithMiddleware,
@@ -412,7 +412,7 @@ impl ConfigurationBuilder {
412412
let cache_dir = self.cache_dir.unwrap_or_else(|| {
413413
rattler_cache::default_cache_dir().expect("failed to determine default cache directory")
414414
});
415-
let client = self.client.expect("client not initialized");
415+
let client = self.client.unwrap_or_default();
416416
let package_cache = PackageCache::new(cache_dir.join(rattler_cache::PACKAGE_CACHE_DIR));
417417
let channel_config = self.channel_config.unwrap_or_else(|| {
418418
ChannelConfig::default_with_root_dir(

0 commit comments

Comments
 (0)