Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "0.11.0"
version = "0.12.0"
authors = ["The Wasmtime Project Developers"]
license = "Apache-2.0 WITH LLVM-exception"

Expand Down Expand Up @@ -36,9 +36,9 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
"fmt",
"env-filter",
] }
wasm-pkg-common = { version = "0.11.0", path = "crates/wasm-pkg-common" }
wasm-pkg-client = { version = "0.11.0", path = "crates/wasm-pkg-client" }
wasm-pkg-core = { version = "0.11.0", path = "crates/wasm-pkg-core" }
wasm-pkg-common = { version = "0.12.0", path = "crates/wasm-pkg-common" }
wasm-pkg-client = { version = "0.12.0", path = "crates/wasm-pkg-client" }
wasm-pkg-core = { version = "0.12.0", path = "crates/wasm-pkg-core" }
wasm-metadata = "0.235"
wit-component = "0.235"
wit-parser = "0.235"
3 changes: 1 addition & 2 deletions crates/wasm-pkg-client/src/caching/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ impl Cache for FileCache {
let mut file = tokio::fs::File::create(&path).await.map_err(|e| {
Error::CacheError(anyhow::anyhow!("Unable to create file for cache {e}"))
})?;
let mut buf =
StreamReader::new(data.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)));
let mut buf = StreamReader::new(data.map_err(std::io::Error::other));
tokio::io::copy(&mut buf, &mut file)
.await
.map_err(|e| Error::CacheError(e.into()))
Expand Down
7 changes: 3 additions & 4 deletions crates/wasm-pkg-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ impl Client {
let (mut data, p, v) = tokio::task::spawn_blocking(|| resolve_package(data))
.await
.map_err(|e| {
crate::Error::IoError(std::io::Error::new(
std::io::ErrorKind::Other,
format!("Error when performing blocking IO: {e:?}"),
))
crate::Error::IoError(std::io::Error::other(format!(
"Error when performing blocking IO: {e:?}"
)))
})??;
// We must rewind the reader because we read to the end to parse the component.
data.rewind().await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/wasm-pkg-client/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Ord for VersionInfo {

impl PartialOrd for VersionInfo {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.version.cmp(&other.version))
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/wasm-pkg-common/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl RegistryMetadata {
}

/// Returns an iterator of protocols configured by the registry.
pub fn configured_protocols(&self) -> impl Iterator<Item = Cow<str>> {
pub fn configured_protocols(&self) -> impl Iterator<Item = Cow<'_, str>> {
let mut protos: BTreeSet<String> = self.protocol_configs.keys().cloned().collect();
// Backward-compatibility aliases
if self.oci_registry.is_some() || self.oci_namespace_prefix.is_some() {
Expand Down
8 changes: 4 additions & 4 deletions crates/wasm-pkg-core/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ impl RegistryResolution {
)
.await?;

Ok(tokio_util::io::StreamReader::new(stream.map_err(|e| {
std::io::Error::new(std::io::ErrorKind::Other, e)
})))
Ok(tokio_util::io::StreamReader::new(
stream.map_err(std::io::Error::other),
))
}
}

Expand Down Expand Up @@ -181,7 +181,7 @@ impl DependencyResolution {
}

/// Decodes the resolved dependency.
pub async fn decode(&self) -> Result<DecodedDependency> {
pub async fn decode(&self) -> Result<DecodedDependency<'_>> {
// If the dependency path is a directory, assume it contains wit to parse as a package.
let bytes = match self {
DependencyResolution::Local(LocalResolution { path, .. })
Expand Down
Loading