Change interface SDL to adhere to spec
When only one interface is implemented, there is no &. The & is only to combine more than one interface.
@@ -131,10 +131,7 @@ impl Registry {
write!(sdl, "type {} ", name).ok();
if let Some(implements) = self.implements.get(name) {
if !implements.is_empty() {
- write!(sdl, "implements ").ok();
- for interface in implements {
- write!(sdl, "& {} ", interface).ok();
- }
+ write!(sdl, "implements {} ", implements.iter().map(AsRef::as_ref).collect::<Vec<&str>>().join(" & ")).ok();
}
}
