Skip to content

Commit bcf29e1

Browse files
authored
update typify; fix some nits (#1018)
1 parent cb9bf78 commit bcf29e1

29 files changed

+4839
-4490
lines changed

Cargo.lock

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

progenitor-impl/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ expectorate = { workspace = true }
2929
futures = { workspace = true }
3030
http = { workspace = true }
3131
hyper = { workspace = true }
32+
progenitor-client = { workspace = true }
3233
reqwest = { workspace = true }
3334
rustfmt-wrapper = { workspace = true }
3435
semver = { workspace = true }
3536
serde_yaml = { workspace = true }
3637
tokio = { workspace = true }
37-
38-
progenitor-client.path = "../progenitor-client"

progenitor-impl/src/lib.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,9 @@ impl Generator {
406406

407407
let version_str = &spec.info.version;
408408

409-
// The allow(unused_imports) on the `pub use` is necessary with Rust 1.76+, in case the
410-
// generated file is not at the top level of the crate.
409+
// The allow(unused_imports) on the `pub use` is necessary with Rust
410+
// 1.76+, in case the generated file is not at the top level of the
411+
// crate.
411412

412413
let file = quote! {
413414
// Re-export ResponseValue and Error since those are used by the
@@ -512,11 +513,13 @@ impl Generator {
512513
.map(|method| self.positional_method(method, has_inner))
513514
.collect::<Result<Vec<_>>>()?;
514515

515-
// The allow(unused_imports) on the `pub use` is necessary with Rust 1.76+, in case the
516-
// generated file is not at the top level of the crate.
516+
// The allow(unused_imports) on the `pub use` is necessary with Rust
517+
// 1.76+, in case the generated file is not at the top level of the
518+
// crate.
517519

518520
let out = quote! {
519521
#[allow(clippy::all)]
522+
#[allow(elided_named_lifetimes)]
520523
impl Client {
521524
#(#methods)*
522525
}
@@ -590,8 +593,9 @@ impl Generator {
590593

591594
let (traits_and_impls, trait_preludes) = self.builder_tags(input_methods, &tag_info);
592595

593-
// The allow(unused_imports) on the `pub use` is necessary with Rust 1.76+, in case the
594-
// generated file is not at the top level of the crate.
596+
// The allow(unused_imports) on the `pub use` is necessary with Rust
597+
// 1.76+, in case the generated file is not at the top level of the
598+
// crate.
595599

596600
let out = quote! {
597601
#traits_and_impls
@@ -631,12 +635,14 @@ impl Generator {
631635
&self.type_space
632636
}
633637

634-
/// Whether the generated client needs to use additional crates to support futures.
638+
/// Whether the generated client needs to use additional crates to support
639+
/// futures.
635640
pub fn uses_futures(&self) -> bool {
636641
self.uses_futures
637642
}
638643

639-
/// Whether the generated client needs to use additional crates to support websockets.
644+
/// Whether the generated client needs to use additional crates to support
645+
/// websockets.
640646
pub fn uses_websockets(&self) -> bool {
641647
self.uses_websockets
642648
}

progenitor-impl/tests/output/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ uuid = { features = ["serde", "v4"], version = "1" }
2424

2525
[lints.rust]
2626
unused_imports = "allow"
27-
unused_variables= "allow"
27+
unused_variables = "allow"
2828

2929
[lints.clippy]
3030
needless_lifetimes = "allow"

0 commit comments

Comments
 (0)