Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Pin poem-openapi #20

Merged
merged 3 commits into from
Dec 3, 2024
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
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "WASM AST"
bincode = { version = "2.0.0-rc.3", optional = true }
leb128 = { version = "0.2.5", optional = true }
mappable-rc = "0.1.1"
poem-openapi = { version = "5.0", optional = true }
poem-openapi = { version = "=5.1.3", optional = true }
prost = { version = "0.12", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
Expand Down
1 change: 1 addition & 0 deletions src/component/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub mod writer;
/// The Component Model section nodes.
///
/// See [Section] for more information.
#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone, PartialEq)]
pub enum ComponentSection<Ast: AstCustomization + 'static> {
Module(Module<Ast>),
Expand Down
26 changes: 13 additions & 13 deletions src/component/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::core::{Data, TryFromExprSource};
use crate::Sections;
use wasmparser::{Chunk, Parser, Payload};

impl<'a> TryFrom<wasmparser::InstantiationArg<'a>> for InstantiationArg {
impl TryFrom<wasmparser::InstantiationArg<'_>> for InstantiationArg {
type Error = String;

fn try_from(value: wasmparser::InstantiationArg) -> Result<Self, Self::Error> {
Expand All @@ -33,7 +33,7 @@ impl<'a> TryFrom<wasmparser::InstantiationArg<'a>> for InstantiationArg {
}
}

impl<'a> TryFrom<wasmparser::Instance<'a>> for Instance {
impl TryFrom<wasmparser::Instance<'_>> for Instance {
type Error = String;

fn try_from(value: wasmparser::Instance) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -65,7 +65,7 @@ impl TryFrom<wasmparser::OuterAliasKind> for OuterAliasKind {
}
}

impl<'a> TryFrom<wasmparser::ModuleTypeDeclaration<'a>> for ModuleDeclaration {
impl TryFrom<wasmparser::ModuleTypeDeclaration<'_>> for ModuleDeclaration {
type Error = String;

fn try_from(value: wasmparser::ModuleTypeDeclaration) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -112,7 +112,7 @@ impl TryFrom<wasmparser::SubType> for FuncType {
}
}

impl<'a> TryFrom<wasmparser::CoreType<'a>> for CoreType {
impl TryFrom<wasmparser::CoreType<'_>> for CoreType {
type Error = String;

fn try_from(value: wasmparser::CoreType) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -158,7 +158,7 @@ impl<'a> TryFrom<wasmparser::ComponentInstantiationArg<'a>> for ComponentInstant
}
}

impl<'a> TryFrom<wasmparser::ComponentExportName<'a>> for ComponentExternName {
impl TryFrom<wasmparser::ComponentExportName<'_>> for ComponentExternName {
type Error = String;

fn try_from(value: wasmparser::ComponentExportName) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -257,7 +257,7 @@ impl<'a> TryFrom<wasmparser::ComponentExport<'a>> for ComponentExport {
}
}

impl<'a> TryFrom<wasmparser::ComponentInstance<'a>> for ComponentInstance {
impl TryFrom<wasmparser::ComponentInstance<'_>> for ComponentInstance {
type Error = String;

fn try_from(value: wasmparser::ComponentInstance) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -344,7 +344,7 @@ impl<'a> TryFrom<wasmparser::ComponentAlias<'a>> for Alias {
}
}

impl<'a> TryFrom<wasmparser::VariantCase<'a>> for VariantCase {
impl TryFrom<wasmparser::VariantCase<'_>> for VariantCase {
type Error = String;

fn try_from(value: wasmparser::VariantCase) -> Result<Self, Self::Error> {
Expand All @@ -359,7 +359,7 @@ impl<'a> TryFrom<wasmparser::VariantCase<'a>> for VariantCase {
}
}

impl<'a> TryFrom<wasmparser::ComponentDefinedType<'a>> for ComponentDefinedType {
impl TryFrom<wasmparser::ComponentDefinedType<'_>> for ComponentDefinedType {
type Error = String;

fn try_from(value: wasmparser::ComponentDefinedType) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -431,7 +431,7 @@ impl<'a> TryFrom<wasmparser::ComponentDefinedType<'a>> for ComponentDefinedType
}
}

impl<'a> TryFrom<wasmparser::ComponentFuncResult<'a>> for ComponentFuncResult {
impl TryFrom<wasmparser::ComponentFuncResult<'_>> for ComponentFuncResult {
type Error = String;

fn try_from(value: wasmparser::ComponentFuncResult) -> Result<Self, Self::Error> {
Expand All @@ -449,7 +449,7 @@ impl<'a> TryFrom<wasmparser::ComponentFuncResult<'a>> for ComponentFuncResult {
}
}

impl<'a> TryFrom<wasmparser::ComponentFuncType<'a>> for ComponentFuncType {
impl TryFrom<wasmparser::ComponentFuncType<'_>> for ComponentFuncType {
type Error = String;

fn try_from(value: wasmparser::ComponentFuncType) -> Result<Self, Self::Error> {
Expand All @@ -464,15 +464,15 @@ impl<'a> TryFrom<wasmparser::ComponentFuncType<'a>> for ComponentFuncType {
}
}

impl<'a> TryFrom<wasmparser::ComponentImportName<'a>> for ComponentExternName {
impl TryFrom<wasmparser::ComponentImportName<'_>> for ComponentExternName {
type Error = String;

fn try_from(value: wasmparser::ComponentImportName) -> Result<Self, Self::Error> {
Ok(ComponentExternName::Name(value.0.to_string()))
}
}

impl<'a> TryFrom<wasmparser::ComponentImport<'a>> for ComponentImport {
impl TryFrom<wasmparser::ComponentImport<'_>> for ComponentImport {
type Error = String;

fn try_from(value: wasmparser::ComponentImport) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -534,7 +534,7 @@ impl<'a> TryFrom<wasmparser::InstanceTypeDeclaration<'a>> for InstanceTypeDeclar
}
}

impl<'a> TryFrom<wasmparser::ComponentType<'a>> for ComponentType {
impl TryFrom<wasmparser::ComponentType<'_>> for ComponentType {
type Error = String;

fn try_from(value: wasmparser::ComponentType) -> Result<Self, Self::Error> {
Expand Down
24 changes: 11 additions & 13 deletions src/core/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl TryFrom<wasmparser::TypeRef> for TypeRef {
}
}

impl<'a> TryFrom<wasmparser::Import<'a>> for Import {
impl TryFrom<wasmparser::Import<'_>> for Import {
type Error = String;

fn try_from(value: wasmparser::Import) -> Result<Self, Self::Error> {
Expand All @@ -141,7 +141,7 @@ impl<'a> TryFrom<wasmparser::Import<'a>> for Import {
}
}

impl<'a> TryFrom<wasmparser::Table<'a>> for Table {
impl TryFrom<wasmparser::Table<'_>> for Table {
type Error = String;

fn try_from(value: wasmparser::Table) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -227,7 +227,7 @@ impl TryFrom<wasmparser::HeapType> for RefType {
}
}

impl<'a> TryFrom<wasmparser::Export<'a>> for Export {
impl TryFrom<wasmparser::Export<'_>> for Export {
type Error = String;

fn try_from(value: wasmparser::Export) -> Result<Self, Self::Error> {
Expand All @@ -247,7 +247,7 @@ impl<'a> TryFrom<wasmparser::Export<'a>> for Export {
}
}

impl<'a> TryFrom<wasmparser::ElementKind<'a>> for ElemMode {
impl TryFrom<wasmparser::ElementKind<'_>> for ElemMode {
type Error = String;

fn try_from(value: wasmparser::ElementKind) -> Result<Self, Self::Error> {
Expand All @@ -265,7 +265,7 @@ impl<'a> TryFrom<wasmparser::ElementKind<'a>> for ElemMode {
}
}

impl<'a, T: TryFromExprSource> TryFrom<wasmparser::Element<'a>> for Elem<T> {
impl<T: TryFromExprSource> TryFrom<wasmparser::Element<'_>> for Elem<T> {
type Error = String;

fn try_from(value: wasmparser::Element) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -302,7 +302,7 @@ impl<'a, T: TryFromExprSource> TryFrom<wasmparser::Element<'a>> for Elem<T> {
}
}

impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::DataKind<'a>>
impl<T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::DataKind<'_>>
for DataMode<T>
{
type Error = String;
Expand All @@ -325,9 +325,7 @@ impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::D
}
}

impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::Data<'a>>
for Data<T>
{
impl<T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::Data<'_>> for Data<T> {
type Error = String;

fn try_from(value: wasmparser::Data) -> Result<Self, Self::Error> {
Expand All @@ -338,7 +336,7 @@ impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::D
}
}

impl<'a, T: TryFromExprSource> TryFrom<wasmparser::FunctionBody<'a>> for FuncCode<T> {
impl<T: TryFromExprSource> TryFrom<wasmparser::FunctionBody<'_>> for FuncCode<T> {
type Error = String;

fn try_from(value: wasmparser::FunctionBody) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -387,7 +385,7 @@ impl OperatorTarget {
}
}

impl<'a> TryFrom<OperatorsReader<'a>> for Expr {
impl TryFrom<OperatorsReader<'_>> for Expr {
type Error = String;

fn try_from(value: OperatorsReader) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -1852,7 +1850,7 @@ impl<'a> OperatorsReaderExprSource<'a> {
}
}

impl<'a> ExprSource for OperatorsReaderExprSource<'a> {
impl ExprSource for OperatorsReaderExprSource<'_> {
fn unparsed(self) -> Result<Vec<u8>, String> {
let binary_reader: BinaryReader = self.reader.get_binary_reader();
let range = binary_reader.range();
Expand All @@ -1863,7 +1861,7 @@ impl<'a> ExprSource for OperatorsReaderExprSource<'a> {
}
}

impl<'a> IntoIterator for OperatorsReaderExprSource<'a> {
impl IntoIterator for OperatorsReaderExprSource<'_> {
type Item = Result<Instr, String>;
type IntoIter = Box<dyn Iterator<Item = Result<Instr, String>>>;

Expand Down
2 changes: 1 addition & 1 deletion src/core/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ fn add_to_import_section(section: &mut wasm_encoder::ImportSection, value: &Impo
section.import(&value.module, &value.name, entity_type);
}

impl<'a> From<Custom> for wasm_encoder::CustomSection<'a> {
impl From<Custom> for wasm_encoder::CustomSection<'_> {
fn from(value: Custom) -> Self {
wasm_encoder::CustomSection {
name: value.name.into(),
Expand Down
Loading