Skip to content

Commit

Permalink
fix(swagger-ui): resolved sub crate changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wicpar committed Sep 25, 2023
1 parent 99c816a commit f00d4f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actix-web-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn config_route(config: Config, spec_name: String) -> Route {

fn spec_route(spec: Spec) -> Route {
let content_type = content_type(&spec.name);
let content = Vec::from(spec.content);
let content = spec.content.into_owned();

web::to(move || {
HttpResponse::Ok()
Expand Down
6 changes: 3 additions & 3 deletions rocket-swagger-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ fn mime_type(filename: &str) -> ContentType {
pub fn routes(spec: Spec, mut config: Config) -> Vec<Route> {
let spec_handler =
ContentHandler::bytes(
mime_type(spec.name.as_str()),
Vec::from(spec.content),
mime_type(spec.name.as_ref()),
spec.content.into_owned(),
);

let spec_name: &str =
Path::new(&spec.name)
Path::new(spec.name.as_ref())
.file_name()
.unwrap_or("openapi.json".as_ref())
.to_str()
Expand Down
2 changes: 1 addition & 1 deletion swagger-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "swagger-ui"
version = "0.1.5"
authors = ["kotborealis <[email protected]>"]
edition = "2018"
edition = "2021"
exclude = [
".idea"
]
Expand Down

0 comments on commit f00d4f3

Please sign in to comment.