Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d75a9d

Browse files
authored
Merge pull request#6 from unicode-rs/fmt
Add Display impls
2 parents2543254 +9f74354 commit1d75a9d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎src/lib.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ impl From<char> for Script {
112112
}
113113
}
114114

115+
impl fmt::DisplayforScript{
116+
fnfmt(&self,f:&mut fmt::Formatter) -> fmt::Result{
117+
write!(f,"{}",self.full_name())
118+
}
119+
}
120+
115121
#[derive(Clone,Copy,PartialEq,Eq,Hash)]
116122
#[non_exhaustive]
117123
/// A value for the `Script_Extension` property
@@ -295,6 +301,13 @@ impl From<&'_ str> for ScriptExtension {
295301
impl fmt::DebugforScriptExtension{
296302
fnfmt(&self,f:&mut fmt::Formatter) -> fmt::Result{
297303
write!(f,"ScriptExtension(")?;
304+
fmt::Display::fmt(self, f)?;
305+
write!(f,")")
306+
}
307+
}
308+
309+
impl fmt::DisplayforScriptExtension{
310+
fnfmt(&self,f:&mut fmt::Formatter) -> fmt::Result{
298311
ifself.is_common(){
299312
write!(f,"Common")?;
300313
}elseifself.is_inherited(){
@@ -311,7 +324,7 @@ impl fmt::Debug for ScriptExtension {
311324
script.full_name().fmt(f)?;
312325
}
313326
}
314-
write!(f,")")
327+
Ok(())
315328
}
316329
}
317330

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp