Skip to content

Commit

Permalink
Fix typos in trait implementation titles and improve formatting in ge…
Browse files Browse the repository at this point in the history
…nerator output
  • Loading branch information
AS1100K committed Jan 25, 2025
1 parent 6438629 commit 607179f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/generators/impls_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ImplsGenerator {
};

let mut trait_implementations = InnerModuleContent {
title: "Traitl Implementations".to_string(),
title: "Trait Implementations".to_string(),
content: String::new(),
};

Expand Down Expand Up @@ -49,7 +49,7 @@ impl ImplsGenerator {
};

if let Some(trait_) = &impl_info.trait_ {
current_impl.content.push_str("impl");
current_impl.content.push_str("`impl");
current_impl.content.push_str(&params);
current_impl.content.push_str(" ");

Expand All @@ -65,7 +65,7 @@ impl ImplsGenerator {
.content
.push_str(&&TypeGenerator::type_to_string(&impl_info.for_));
current_impl.content.push_str(&where_predicate);
current_impl.content.push_str("\n");
current_impl.content.push_str("`\n\n");
}

// Generate syntax for functions
Expand All @@ -81,7 +81,7 @@ impl ImplsGenerator {
function,
function_name,
)?);
current_impl.content.push_str("\n");
current_impl.content.push_str("\n\n");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/generators/struct_gen.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use super::impls_gen::ImplsGenerator;
use crate::generators::generic_gen::GenericGenerator;
use crate::generators::module_gen::InnerModuleContent;
use crate::generators::type_gen::TypeGenerator;
use crate::generators::visibility_gen::VisibilityGenerator;
use crate::generators::{ExternalCrates, Generator, Index, Paths};
use anyhow::Result;
use rustdoc_types::{Item, ItemEnum, StructKind};
use super::impls_gen::ImplsGenerator;

pub struct StructGenerator;

Expand Down

0 comments on commit 607179f

Please sign in to comment.