Skip to content

Commit

Permalink
Fix rustdoc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
geieredgar committed Feb 17, 2023
1 parent 19a1bb3 commit 3599a45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions crates/bevy_ecs/src/schedule/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,13 @@ where
/// # Examples
///
/// ```
/// # use bevy_ecs::prelude::*;
/// # let mut app = Schedule::new();
/// # fn a() {}
/// # fn b() {}
/// # fn condition() -> bool { true }
/// # #[derive(SystemSet, Debug, Eq, PartialEq, Hash, Clone, Copy)]
/// # struct C;
/// app.add_systems((a, b).collective_run_if(condition));
/// app.add_systems((a, b).in_set(C)).configure_set(C.run_if(condition));
/// ```
Expand Down Expand Up @@ -560,8 +567,13 @@ where
/// system, as shown below:
///
/// ```
/// app.add_systems((a, b).distributive_run_if(condition))
/// app.add_systems((a.run_if(condition), b.run_if(condition)))
/// # use bevy_ecs::prelude::*;
/// # let mut app = Schedule::new();
/// # fn a() {}
/// # fn b() {}
/// # fn condition() -> bool { true }
/// app.add_systems((a, b).distributive_run_if(condition));
/// app.add_systems((a.run_if(condition), b.run_if(condition)));
/// ```
///
/// # Note
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/bevy_reflect_derive/src/type_uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Parse for TypeUuidDef {
let generics = input.parse::<Generics>()?;
input.parse::<Token![,]>()?;
let uuid = input.parse::<LitStr>()?.value();
let uuid = Uuid::parse_str(&uuid).map_err(|err| input.error(format!("{}", err)))?;
let uuid = Uuid::parse_str(&uuid).map_err(|err| input.error(format!("{err}")))?;

Ok(Self {
type_ident,
Expand Down

0 comments on commit 3599a45

Please sign in to comment.