Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1891582

Browse filesBrowse files
committed
chore: correct new linting errors
1 parent 85aaa0a commit 1891582
Copy full SHA for 1891582

File tree

Expand file treeCollapse file tree

1 file changed

+4
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-9
lines changed
Open diff view settings
Collapse file

‎postgresql_embedded/src/settings.rs‎

Copy file name to clipboardExpand all lines: postgresql_embedded/src/settings.rs
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::env;
88
use std::env::current_dir;
99
use std::ffi::OsString;
1010
use std::path::PathBuf;
11+
#[cfg(feature = "bundled")]
1112
use std::str::FromStr;
1213
#[cfg(feature = "bundled")]
1314
use std::sync::LazyLock;
@@ -156,19 +157,13 @@ impl Settings {
156157
settings.version = VersionReq::parse(version)?;
157158
}
158159
if let Some(installation_dir) = query_parameters.get("installation_dir") {
159-
if let Ok(path) = PathBuf::from_str(installation_dir) {
160-
settings.installation_dir = path;
161-
}
160+
settings.installation_dir = PathBuf::from(installation_dir);
162161
}
163162
if let Some(password_file) = query_parameters.get("password_file") {
164-
if let Ok(path) = PathBuf::from_str(password_file) {
165-
settings.password_file = path;
166-
}
163+
settings.password_file = PathBuf::from(password_file);
167164
}
168165
if let Some(data_dir) = query_parameters.get("data_dir") {
169-
if let Ok(path) = PathBuf::from_str(data_dir) {
170-
settings.data_dir = path;
171-
}
166+
settings.data_dir = PathBuf::from(data_dir);
172167
}
173168
if let Some(host) = parsed_url.host() {
174169
settings.host = host.to_string();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.