Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Apr 12, 2024
1 parent 16ec6a0 commit 4323c11
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions cargo-progenitor/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// Copyright 2023 Oxide Computer Company

//! The cargo tool to generate a rust representation of an OpenAPI spec.
#![deny(missing_docs)]
#![deny(unused_crate_dependencies)]
#![deny(unused_imports)]
#![deny(unused_import_braces)]

use std::{
collections::HashMap,
fs::{File, OpenOptions},
Expand All @@ -13,6 +20,7 @@ use openapiv3::OpenAPI;
use progenitor::{GenerationSettings, Generator, InterfaceStyle, TagStyle};
use progenitor_impl::space_out_items;

/// Include the artifact created by `build.rs`.
pub mod built_info {
// The file has been placed there by the build script.
include!(concat!(env!("OUT_DIR"), "/built.rs"));
Expand Down Expand Up @@ -225,6 +233,7 @@ fn main() -> Result<()> {
Ok(())
}

/// List of dependencies required when including the generated code.
pub fn dependencies(builder: Generator, include_client: bool) -> Vec<String> {
let dependency_versions: HashMap<String, String> = built_info::DEPENDENCIES
.iter()
Expand Down
3 changes: 3 additions & 0 deletions progenitor-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//! Support for generated clients.
#![deny(missing_docs)]
#![deny(unused_crate_dependencies)]
#![deny(unused_imports)]
#![deny(unused_import_braces)]

mod progenitor_client;

Expand Down
4 changes: 0 additions & 4 deletions progenitor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ categories = ["api-bindings", "compilers"]
progenitor-client = { version = "0.6.0", path = "../progenitor-client" }
progenitor-impl = { version = "0.6.0", path = "../progenitor-impl" }
progenitor-macro = { version = "0.6.0", path = "../progenitor-macro" }
serde_json = "1.0"
serde_yaml = "0.9"
clap = { version = "4.1.14", features = ["derive"] }
expander = "2.1.0"

[dev-dependencies]
base64 = "0.22"
Expand Down
3 changes: 3 additions & 0 deletions progenitor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
//! README](https://github.com/oxidecomputer/progenitor/blob/main/README.md)
#![deny(missing_docs)]
#![deny(unused_crate_dependencies)]
#![deny(unused_imports)]
#![deny(unused_import_braces)]

pub use progenitor_client;
pub use progenitor_impl::Error;
Expand Down

0 comments on commit 4323c11

Please sign in to comment.