Add missing closing ticks for inline examples and some cleanup (#3573)

# Objective

- clean up documentation and inline examples

## Solution

- add missing closing "```"
- remove stray "```"
- remove whitespace in inline examples
- unify inline examples (remove some `rust` labels)
This commit is contained in:
Niklas Eicker 2022-01-07 09:25:12 +00:00
parent 015da72250
commit fbab01a40d
9 changed files with 17 additions and 15 deletions

View file

@ -36,7 +36,7 @@
//! Manually enabling dynamic linking is achieved by adding `bevy_dylib` as a dependency and
//! adding the following code to the `main.rs` file:
//!
//! ```rust
//! ```
//! #[allow(unused_imports)]
//! use bevy_dylib;
//! ```
@ -44,7 +44,7 @@
//! It is recommended to disable the `bevy_dylib` dependency in release mode by adding the
//! following code to the `use` statement to avoid having to ship additional files with your game:
//!
//! ```rust
//! ```
//! #[allow(unused_imports)]
//! #[cfg(debug_assertions)] // new
//! use bevy_dylib;

View file

@ -161,6 +161,7 @@ impl Schedule {
/// # schedule.add_stage("target_stage", SystemStage::parallel());
/// #
/// schedule.add_stage_before("target_stage", "my_stage", SystemStage::parallel());
/// ```
pub fn add_stage_before<S: Stage>(
&mut self,
target: impl StageLabel,
@ -197,6 +198,7 @@ impl Schedule {
/// # schedule.add_stage("my_stage", SystemStage::parallel());
/// #
/// schedule.add_system_to_stage("my_stage", my_system);
/// ```
pub fn add_system_to_stage<Params>(
&mut self,
stage_label: impl StageLabel,
@ -324,6 +326,7 @@ impl Schedule {
/// # schedule.add_stage("my_stage", SystemStage::parallel());
/// #
/// let stage = schedule.get_stage_mut::<SystemStage>(&"my_stage").unwrap();
/// ```
pub fn get_stage_mut<T: Stage>(&mut self, label: &dyn StageLabel) -> Option<&mut T> {
self.stages
.get_mut(label)

View file

@ -3,7 +3,7 @@
//!
//! # Examples
//!
//! ```rust
//! ```
//! use bevy_render::mesh::VertexAttributeValues;
//!
//! // creating std::vec::Vec

View file

@ -46,7 +46,6 @@ pub enum PhysicsSystem {
/// ordering can then change between invocations.
///
/// Lastly a system with run criterion _done_ is used to exit the app.
/// ```
fn main() {
App::new()
.add_plugins(DefaultPlugins)

View file

@ -24,7 +24,7 @@
//! println!("hello world");
//! }
//! ```
//!
//! Don't let the simplicity of the example above fool you. Bevy is a [fully featured game engine](https://bevyengine.org)
//! and it gets more powerful every day!
//!