Skip to content

Commit d4936cb

Browse files
committed
Fixes for debug formatting
`Debug` and `Display` now properly print all the scripts with " + " seperators.
1 parent 1f84c2e commit d4936cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,10 @@ impl fmt::Display for ScriptExtension {
330330
} else {
331331
let mut first = true;
332332
for script in self.iter() {
333-
if !first {
334-
write!(f, " + ")?;
333+
if first {
335334
first = false;
335+
} else {
336+
write!(f, " + ")?;
336337
}
337338
script.full_name().fmt(f)?;
338339
}
@@ -361,7 +362,7 @@ impl UnicodeScript for char {
361362

362363
/// Iterator over scripts in a [ScriptExtension].
363364
///
364-
/// Can be obtained ia [ScriptExtension::iter()]
365+
/// Can be obtained via [ScriptExtension::iter()]
365366
pub struct ScriptIterator {
366367
ext: ScriptExtension,
367368
}

0 commit comments

Comments
 (0)