Skip to content

Commit 680e3db

Browse files
Merge pull request #179 from theseus-rs/update-to-rust-1.87.0
chore: update to Rust 1.87.0
2 parents 61e2529 + 820ce12 commit 680e3db

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ edition = "2024"
2121
keywords = ["postgresql", "postgres", "embedded", "database", "server"]
2222
license = "(Apache-2.0 OR MIT) AND PostgreSQL"
2323
repository = "https://github.com/theseus-rs/postgresql-embedded"
24-
rust-version = "1.86.0"
24+
rust-version = "1.87.0"
2525
version = "0.18.3"
2626

2727
[workspace.dependencies]

postgresql_archive/src/extractor/zip_extractor.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ use zip::ZipArchive;
1616
pub fn extract(bytes: &Vec<u8>, extract_directories: ExtractDirectories) -> Result<Vec<PathBuf>> {
1717
let mut files = Vec::new();
1818
let reader = Cursor::new(bytes);
19-
let mut archive =
20-
ZipArchive::new(reader).map_err(|_| io::Error::new(io::ErrorKind::Other, "Zip error"))?;
19+
let mut archive = ZipArchive::new(reader).map_err(|_| io::Error::other("Zip error"))?;
2120
let mut extracted_bytes = 0;
2221

2322
for i in 0..archive.len() {
2423
let mut file = archive
2524
.by_index(i)
26-
.map_err(|_| io::Error::new(io::ErrorKind::Other, "Zip error"))?;
25+
.map_err(|_| io::Error::other("Zip error"))?;
2726
let file_path = PathBuf::from(file.name());
2827
let file_path = PathBuf::from(file_path.file_name().unwrap_or_default());
2928
let file_name = file_path.to_string_lossy();

postgresql_commands/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mod test {
3838

3939
#[test]
4040
fn test_from_io_error() {
41-
let io_error = std::io::Error::new(std::io::ErrorKind::Other, "test");
41+
let io_error = std::io::Error::other("test");
4242
let error = Error::from(io_error);
4343
assert_eq!(error.to_string(), "test");
4444
}

postgresql_embedded/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mod test {
8080

8181
#[test]
8282
fn test_from_io_error() {
83-
let io_error = std::io::Error::new(std::io::ErrorKind::Other, "test");
83+
let io_error = std::io::Error::other("test");
8484
let error = Error::from(io_error);
8585
assert_eq!(error.to_string(), "test");
8686
}

postgresql_embedded/src/postgresql.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ impl PostgreSQL {
128128
// Sort the versions in descending order i.e. latest version first
129129
versions.sort_by(|(a, _), (b, _)| b.cmp(a));
130130
// Get the first matching version as the best match
131-
let version_path = versions.first().map(|(_, path)| path.clone());
132-
version_path
131+
versions.first().map(|(_, path)| path.clone())
133132
}
134133

135134
/// Check if the `PostgreSQL` server is initialized

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.86.0"
2+
channel = "1.87.0"
33
profile = "default"

0 commit comments

Comments
 (0)