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

Commit ac8efb3

Browse files
authored
Merge pull request #20 from golemcloud/pin-poem-openapi
Pin poem-openapi
2 parents bfd8ae1 + e506bb6 commit ac8efb3

File tree

6 files changed

+32
-33
lines changed

6 files changed

+32
-33
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "WASM AST"
1010
bincode = { version = "2.0.0-rc.3", optional = true }
1111
leb128 = { version = "0.2.5", optional = true }
1212
mappable-rc = "0.1.1"
13-
poem-openapi = { version = "5.0", optional = true }
13+
poem-openapi = { version = "=5.1.3", optional = true }
1414
prost = { version = "0.12", optional = true }
1515
serde = { version = "1.0", optional = true, features = ["derive"] }
1616
serde_json = { version = "1.0", optional = true }

src/component/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub mod writer;
3232
/// The Component Model section nodes.
3333
///
3434
/// See [Section] for more information.
35+
#[allow(clippy::large_enum_variant)]
3536
#[derive(Debug, Clone, PartialEq)]
3637
pub enum ComponentSection<Ast: AstCustomization + 'static> {
3738
Module(Module<Ast>),

src/component/parser.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::core::{Data, TryFromExprSource};
1717
use crate::Sections;
1818
use wasmparser::{Chunk, Parser, Payload};
1919

20-
impl<'a> TryFrom<wasmparser::InstantiationArg<'a>> for InstantiationArg {
20+
impl TryFrom<wasmparser::InstantiationArg<'_>> for InstantiationArg {
2121
type Error = String;
2222

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

36-
impl<'a> TryFrom<wasmparser::Instance<'a>> for Instance {
36+
impl TryFrom<wasmparser::Instance<'_>> for Instance {
3737
type Error = String;
3838

3939
fn try_from(value: wasmparser::Instance) -> Result<Self, Self::Error> {
@@ -65,7 +65,7 @@ impl TryFrom<wasmparser::OuterAliasKind> for OuterAliasKind {
6565
}
6666
}
6767

68-
impl<'a> TryFrom<wasmparser::ModuleTypeDeclaration<'a>> for ModuleDeclaration {
68+
impl TryFrom<wasmparser::ModuleTypeDeclaration<'_>> for ModuleDeclaration {
6969
type Error = String;
7070

7171
fn try_from(value: wasmparser::ModuleTypeDeclaration) -> Result<Self, Self::Error> {
@@ -112,7 +112,7 @@ impl TryFrom<wasmparser::SubType> for FuncType {
112112
}
113113
}
114114

115-
impl<'a> TryFrom<wasmparser::CoreType<'a>> for CoreType {
115+
impl TryFrom<wasmparser::CoreType<'_>> for CoreType {
116116
type Error = String;
117117

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

161-
impl<'a> TryFrom<wasmparser::ComponentExportName<'a>> for ComponentExternName {
161+
impl TryFrom<wasmparser::ComponentExportName<'_>> for ComponentExternName {
162162
type Error = String;
163163

164164
fn try_from(value: wasmparser::ComponentExportName) -> Result<Self, Self::Error> {
@@ -257,7 +257,7 @@ impl<'a> TryFrom<wasmparser::ComponentExport<'a>> for ComponentExport {
257257
}
258258
}
259259

260-
impl<'a> TryFrom<wasmparser::ComponentInstance<'a>> for ComponentInstance {
260+
impl TryFrom<wasmparser::ComponentInstance<'_>> for ComponentInstance {
261261
type Error = String;
262262

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

347-
impl<'a> TryFrom<wasmparser::VariantCase<'a>> for VariantCase {
347+
impl TryFrom<wasmparser::VariantCase<'_>> for VariantCase {
348348
type Error = String;
349349

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

362-
impl<'a> TryFrom<wasmparser::ComponentDefinedType<'a>> for ComponentDefinedType {
362+
impl TryFrom<wasmparser::ComponentDefinedType<'_>> for ComponentDefinedType {
363363
type Error = String;
364364

365365
fn try_from(value: wasmparser::ComponentDefinedType) -> Result<Self, Self::Error> {
@@ -431,7 +431,7 @@ impl<'a> TryFrom<wasmparser::ComponentDefinedType<'a>> for ComponentDefinedType
431431
}
432432
}
433433

434-
impl<'a> TryFrom<wasmparser::ComponentFuncResult<'a>> for ComponentFuncResult {
434+
impl TryFrom<wasmparser::ComponentFuncResult<'_>> for ComponentFuncResult {
435435
type Error = String;
436436

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

452-
impl<'a> TryFrom<wasmparser::ComponentFuncType<'a>> for ComponentFuncType {
452+
impl TryFrom<wasmparser::ComponentFuncType<'_>> for ComponentFuncType {
453453
type Error = String;
454454

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

467-
impl<'a> TryFrom<wasmparser::ComponentImportName<'a>> for ComponentExternName {
467+
impl TryFrom<wasmparser::ComponentImportName<'_>> for ComponentExternName {
468468
type Error = String;
469469

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

475-
impl<'a> TryFrom<wasmparser::ComponentImport<'a>> for ComponentImport {
475+
impl TryFrom<wasmparser::ComponentImport<'_>> for ComponentImport {
476476
type Error = String;
477477

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

537-
impl<'a> TryFrom<wasmparser::ComponentType<'a>> for ComponentType {
537+
impl TryFrom<wasmparser::ComponentType<'_>> for ComponentType {
538538
type Error = String;
539539

540540
fn try_from(value: wasmparser::ComponentType) -> Result<Self, Self::Error> {

src/core/parser.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl TryFrom<wasmparser::TypeRef> for TypeRef {
129129
}
130130
}
131131

132-
impl<'a> TryFrom<wasmparser::Import<'a>> for Import {
132+
impl TryFrom<wasmparser::Import<'_>> for Import {
133133
type Error = String;
134134

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

144-
impl<'a> TryFrom<wasmparser::Table<'a>> for Table {
144+
impl TryFrom<wasmparser::Table<'_>> for Table {
145145
type Error = String;
146146

147147
fn try_from(value: wasmparser::Table) -> Result<Self, Self::Error> {
@@ -227,7 +227,7 @@ impl TryFrom<wasmparser::HeapType> for RefType {
227227
}
228228
}
229229

230-
impl<'a> TryFrom<wasmparser::Export<'a>> for Export {
230+
impl TryFrom<wasmparser::Export<'_>> for Export {
231231
type Error = String;
232232

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

250-
impl<'a> TryFrom<wasmparser::ElementKind<'a>> for ElemMode {
250+
impl TryFrom<wasmparser::ElementKind<'_>> for ElemMode {
251251
type Error = String;
252252

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

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

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

305-
impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::DataKind<'a>>
305+
impl<T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::DataKind<'_>>
306306
for DataMode<T>
307307
{
308308
type Error = String;
@@ -325,9 +325,7 @@ impl<'a, T: TryFromExprSource + Debug + Clone + PartialEq> TryFrom<wasmparser::D
325325
}
326326
}
327327

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

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

341-
impl<'a, T: TryFromExprSource> TryFrom<wasmparser::FunctionBody<'a>> for FuncCode<T> {
339+
impl<T: TryFromExprSource> TryFrom<wasmparser::FunctionBody<'_>> for FuncCode<T> {
342340
type Error = String;
343341

344342
fn try_from(value: wasmparser::FunctionBody) -> Result<Self, Self::Error> {
@@ -387,7 +385,7 @@ impl OperatorTarget {
387385
}
388386
}
389387

390-
impl<'a> TryFrom<OperatorsReader<'a>> for Expr {
388+
impl TryFrom<OperatorsReader<'_>> for Expr {
391389
type Error = String;
392390

393391
fn try_from(value: OperatorsReader) -> Result<Self, Self::Error> {
@@ -1852,7 +1850,7 @@ impl<'a> OperatorsReaderExprSource<'a> {
18521850
}
18531851
}
18541852

1855-
impl<'a> ExprSource for OperatorsReaderExprSource<'a> {
1853+
impl ExprSource for OperatorsReaderExprSource<'_> {
18561854
fn unparsed(self) -> Result<Vec<u8>, String> {
18571855
let binary_reader: BinaryReader = self.reader.get_binary_reader();
18581856
let range = binary_reader.range();
@@ -1863,7 +1861,7 @@ impl<'a> ExprSource for OperatorsReaderExprSource<'a> {
18631861
}
18641862
}
18651863

1866-
impl<'a> IntoIterator for OperatorsReaderExprSource<'a> {
1864+
impl IntoIterator for OperatorsReaderExprSource<'_> {
18671865
type Item = Result<Instr, String>;
18681866
type IntoIter = Box<dyn Iterator<Item = Result<Instr, String>>>;
18691867

src/core/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn add_to_import_section(section: &mut wasm_encoder::ImportSection, value: &Impo
352352
section.import(&value.module, &value.name, entity_type);
353353
}
354354

355-
impl<'a> From<Custom> for wasm_encoder::CustomSection<'a> {
355+
impl From<Custom> for wasm_encoder::CustomSection<'_> {
356356
fn from(value: Custom) -> Self {
357357
wasm_encoder::CustomSection {
358358
name: value.name.into(),

0 commit comments

Comments
 (0)