Skip to content

Commit 638f719

Browse files
authored
Merge pull request #105 from collabora/set-mrsv-and-update-to-2024
Set mrsv to 1.85 and update to edition 2024
2 parents 6bc66bc + 909ab3b commit 638f719

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ members = [
33
"bmap-parser",
44
"bmap-rs",
55
]
6+
resolver = "3"
67

78
# Most of the actual work is CPU-heavy, in particular the rust sha2
89
# implementation so use full optimisations otherwise everything will run quite
910
# slow
1011
[profile.dev]
1112
opt-level = 3
13+
14+
[workspace.package]
15+
rust-version = "1.85"

bmap-parser/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
name = "bmap-parser"
33
version = "0.2.0"
44
authors = ["Sjoerd Simons <[email protected]>"]
5-
edition = "2018"
5+
edition = "2024"
66
license = "MIT AND Apache-2.0"
77
description = "bmap-parser is a library for Rust that allows you to copy files or flash block devices safely"
88
repository = "https://github.com/collabora/bmap-rs"
99
readme = "../README.md"
10+
rust-version.workspace = true
1011

1112
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1213

bmap-parser/src/bmap/xml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::bmap::{BmapBuilder, BmapBuilderError, HashType, HashValue};
2-
use quick_xml::de::{from_str, DeError};
2+
use quick_xml::de::{DeError, from_str};
33
use serde::Deserialize;
44
use std::str::FromStr;
55
use thiserror::Error;

bmap-parser/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ pub use crate::bmap::*;
33
mod discarder;
44
pub use crate::discarder::*;
55
use async_trait::async_trait;
6-
use futures::io::{AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt, AsyncWrite, AsyncWriteExt};
76
use futures::TryFutureExt;
7+
use futures::io::{AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt, AsyncWrite, AsyncWriteExt};
88
use sha2::{Digest, Sha256};
99
use thiserror::Error;
1010

bmap-rs/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
name = "bmap-rs"
33
version = "0.2.0"
44
authors = ["Sjoerd Simons <[email protected]>"]
5-
edition = "2018"
5+
edition = "2024"
66
license = "MIT AND Apache-2.0"
77
description = "bmap-rs is an application that handles the use of bmap crate"
88
repository = "https://github.com/collabora/bmap-rs"
99
readme = "../README.md"
10+
rust-version.workspace = true
1011

1112
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1213

bmap-rs/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use anyhow::{anyhow, bail, ensure, Context, Result};
1+
use anyhow::{Context, Result, anyhow, bail, ensure};
22
use async_compression::futures::bufread::GzipDecoder;
33
use bmap_parser::{AsyncDiscarder, Bmap, Discarder, SeekForward};
4-
use clap::{arg, command, Arg, ArgAction, Command};
4+
use clap::{Arg, ArgAction, Command, arg, command};
55
use flate2::read::GzDecoder;
66
use futures::TryStreamExt;
77
use indicatif::{ProgressBar, ProgressState, ProgressStyle};
@@ -241,7 +241,7 @@ async fn copy_remote_input(source: Url, destination: PathBuf) -> Result<()> {
241241
let res = setup_remote_input(source).await?;
242242
let stream = res
243243
.bytes_stream()
244-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
244+
.map_err(std::io::Error::other)
245245
.into_async_read();
246246
let reader = GzipDecoder::new(stream);
247247
let mut input = AsyncDiscarder::new(reader);
@@ -291,7 +291,7 @@ async fn copy_remote_input_nobmap(source: Url, destination: PathBuf) -> Result<(
291291
let res = setup_remote_input(source).await?;
292292
let stream = res
293293
.bytes_stream()
294-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
294+
.map_err(std::io::Error::other)
295295
.into_async_read();
296296
let reader = GzipDecoder::new(stream);
297297
let mut input = AsyncDiscarder::new(reader);

0 commit comments

Comments
 (0)