Skip to content

Commit 8518d2b

Browse files
committed
change impl Display for Profile to use as_str() fn
1 parent 8815103 commit 8518d2b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/bootstrap/setup.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,7 @@ impl FromStr for Profile {
8282

8383
impl fmt::Display for Profile {
8484
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
85-
match self {
86-
Profile::Compiler => write!(f, "compiler"),
87-
Profile::Codegen => write!(f, "codegen"),
88-
Profile::Library => write!(f, "library"),
89-
Profile::User => write!(f, "user"),
90-
Profile::Tools => write!(f, "tools"),
91-
}
85+
f.write_str(self.as_str())
9286
}
9387
}
9488

0 commit comments

Comments
 (0)