Skip to content

Commit

Permalink
Move fn that's only used in submodule into that submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Jan 9, 2025
1 parent 8a09eaf commit 2fa7282
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions crates/aide/src/scalar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Scalar {
url: '{spec_url}'
}}
}}
var apiReference = document.getElementById('api-reference')
apiReference.dataset.configuration = JSON.stringify(configuration)
</script>
Expand All @@ -145,7 +145,6 @@ mod axum_impl {
routing::{get, ApiMethodRouter},
AxumOperationHandler,
};
use crate::scalar::get_static_str;
use axum::response::Html;

impl super::Scalar {
Expand Down Expand Up @@ -198,9 +197,9 @@ mod axum_impl {
move || async move { Html(html) }
}
}
}

fn get_static_str(string: String) -> &'static str {
let static_str = Box::leak(string.into_boxed_str());
static_str
fn get_static_str(string: String) -> &'static str {
let static_str = Box::leak(string.into_boxed_str());
static_str
}
}

0 comments on commit 2fa7282

Please sign in to comment.