Skip to content

Commit aa362fd

Browse files
committed
make write_char defaultable
1 parent fde139a commit aa362fd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

builtin/builtin.mbti

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ pub(open) trait Logger {
803803
write_substring(Self, String, Int, Int) -> Unit
804804
write_char(Self, Char) -> Unit
805805
}
806+
impl Logger::write_char
806807

807808
pub(open) trait Mod {
808809
op_mod(Self, Self) -> Self

builtin/traits.mbt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ pub(open) trait Logger {
5555
write_char(Self, Char) -> Unit
5656
}
5757

58+
///|
59+
impl Logger with write_char(self, value) {
60+
self.write_string([value])
61+
}
62+
5863
///|
5964
/// Trait for types that can be converted to `String`
6065
pub(open) trait Show {

0 commit comments

Comments
 (0)