Unused params
This commit is contained in:
parent
1eb61203b7
commit
095b9110b5
@ -27,9 +27,9 @@ pub(crate) use self::{
|
||||
|
||||
pub(crate) fn docs() -> Result<()> {
|
||||
// We don't commit docs to the repo, so we can just overwrite them.
|
||||
gen_assists_docs::generate_assists_docs(Mode::Overwrite)?;
|
||||
gen_feature_docs::generate_feature_docs(Mode::Overwrite)?;
|
||||
gen_diagnostic_docs::generate_diagnostic_docs(Mode::Overwrite)?;
|
||||
gen_assists_docs::generate_assists_docs()?;
|
||||
gen_feature_docs::generate_feature_docs()?;
|
||||
gen_diagnostic_docs::generate_diagnostic_docs()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -12,12 +12,12 @@ pub(crate) fn generate_assists_tests(mode: Mode) -> Result<()> {
|
||||
generate_tests(&assists, mode)
|
||||
}
|
||||
|
||||
pub(crate) fn generate_assists_docs(mode: Mode) -> Result<()> {
|
||||
pub(crate) fn generate_assists_docs() -> Result<()> {
|
||||
let assists = Assist::collect()?;
|
||||
let contents = assists.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n");
|
||||
let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim());
|
||||
let dst = project_root().join("docs/user/generated_assists.adoc");
|
||||
codegen::update(&dst, &contents, mode)
|
||||
codegen::update(&dst, &contents, Mode::Overwrite)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -7,13 +7,13 @@ use crate::{
|
||||
project_root, rust_files, Result,
|
||||
};
|
||||
|
||||
pub(crate) fn generate_diagnostic_docs(mode: Mode) -> Result<()> {
|
||||
pub(crate) fn generate_diagnostic_docs() -> Result<()> {
|
||||
let diagnostics = Diagnostic::collect()?;
|
||||
let contents =
|
||||
diagnostics.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n");
|
||||
let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim());
|
||||
let dst = project_root().join("docs/user/generated_diagnostic.adoc");
|
||||
codegen::update(&dst, &contents, mode)?;
|
||||
codegen::update(&dst, &contents, Mode::Overwrite)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -7,12 +7,12 @@ use crate::{
|
||||
project_root, rust_files, Result,
|
||||
};
|
||||
|
||||
pub(crate) fn generate_feature_docs(mode: Mode) -> Result<()> {
|
||||
pub(crate) fn generate_feature_docs() -> Result<()> {
|
||||
let features = Feature::collect()?;
|
||||
let contents = features.into_iter().map(|it| it.to_string()).collect::<Vec<_>>().join("\n\n");
|
||||
let contents = format!("//{}\n{}\n", PREAMBLE, contents.trim());
|
||||
let dst = project_root().join("docs/user/generated_features.adoc");
|
||||
codegen::update(&dst, &contents, mode)?;
|
||||
codegen::update(&dst, &contents, Mode::Overwrite)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ fn generate_assists_tests() {
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn generate_lint_completions() {
|
||||
codegen::generate_lint_completions(Mode::Overwrite).unwrap()
|
||||
codegen::generate_lint_completions(Mode::Ensure).unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
x
Reference in New Issue
Block a user