Skip to content

Commit 9f74354

Browse files
committed
Add Display impl for ScriptExtension
1 parent 78a4028 commit 9f74354

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,13 @@ impl From<&'_ str> for ScriptExtension {
301301
impl fmt::Debug for ScriptExtension {
302302
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
303303
write!(f, "ScriptExtension(")?;
304+
fmt::Display::fmt(self, f)?;
305+
write!(f, ")")
306+
}
307+
}
308+
309+
impl fmt::Display for ScriptExtension {
310+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
304311
if self.is_common() {
305312
write!(f, "Common")?;
306313
} else if self.is_inherited() {
@@ -317,7 +324,7 @@ impl fmt::Debug for ScriptExtension {
317324
script.full_name().fmt(f)?;
318325
}
319326
}
320-
write!(f, ")")
327+
Ok(())
321328
}
322329
}
323330

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy