Method
write_world_fragments
(
&mut self,
direction: Direction,
direction_name: &str,
src: &mut String,
access: &str,
name: &String,
)
Source from the content-addressed store, hash-verified
| 111 | } |
| 112 | |
| 113 | fn write_world_fragments( |
| 114 | &mut self, |
| 115 | direction: Direction, |
| 116 | direction_name: &str, |
| 117 | src: &mut String, |
| 118 | access: &str, |
| 119 | name: &String, |
| 120 | ) { |
| 121 | if self |
| 122 | .world_fragments |
| 123 | .iter() |
| 124 | .any(|f| f.direction == Some(direction)) |
| 125 | { |
| 126 | uwrite!( |
| 127 | src, |
| 128 | " |
| 129 | {access} interface I{name}World{direction_name}{{ |
| 130 | " |
| 131 | ); |
| 132 | src.push_str( |
| 133 | &self |
| 134 | .world_fragments |
| 135 | .iter() |
| 136 | .filter(|f| f.direction == Some(direction)) |
| 137 | .map(|f| f.csharp_src.deref()) |
| 138 | .collect::<Vec<_>>() |
| 139 | .join("\n"), |
| 140 | ); |
| 141 | src.push_str("}\n"); |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | impl WorldGenerator for CSharp { |
Tested by
no test coverage detected