From 85aaa0aeb17e84ee954355f5521898f3cd461b01 Mon Sep 17 00:00:00 2001 From: brianheineman Date: Thu, 17 Oct 2024 11:51:43 -0600 Subject: [PATCH 1/2] build: update to Rust 1.82.0 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bbf217f..5f3ff17 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.81.0" +channel = "1.82.0" profile = "default" From 1891582d571069d7ee055afa5df2cde6a1d2b584 Mon Sep 17 00:00:00 2001 From: brianheineman Date: Thu, 17 Oct 2024 12:14:29 -0600 Subject: [PATCH 2/2] chore: correct new linting errors --- postgresql_embedded/src/settings.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/postgresql_embedded/src/settings.rs b/postgresql_embedded/src/settings.rs index c1529b1..00f8713 100644 --- a/postgresql_embedded/src/settings.rs +++ b/postgresql_embedded/src/settings.rs @@ -8,6 +8,7 @@ use std::env; use std::env::current_dir; use std::ffi::OsString; use std::path::PathBuf; +#[cfg(feature = "bundled")] use std::str::FromStr; #[cfg(feature = "bundled")] use std::sync::LazyLock; @@ -156,19 +157,13 @@ impl Settings { settings.version = VersionReq::parse(version)?; } if let Some(installation_dir) = query_parameters.get("installation_dir") { - if let Ok(path) = PathBuf::from_str(installation_dir) { - settings.installation_dir = path; - } + settings.installation_dir = PathBuf::from(installation_dir); } if let Some(password_file) = query_parameters.get("password_file") { - if let Ok(path) = PathBuf::from_str(password_file) { - settings.password_file = path; - } + settings.password_file = PathBuf::from(password_file); } if let Some(data_dir) = query_parameters.get("data_dir") { - if let Ok(path) = PathBuf::from_str(data_dir) { - settings.data_dir = path; - } + settings.data_dir = PathBuf::from(data_dir); } if let Some(host) = parsed_url.host() { settings.host = host.to_string();