We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
with
Symbol
1 parent fa0f7d0 commit d8fca9eCopy full SHA for d8fca9e
src/libsyntax_pos/symbol.rs
@@ -934,19 +934,19 @@ impl Symbol {
934
935
impl fmt::Debug for Symbol {
936
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
937
- fmt::Display::fmt(self, f)
+ self.with(|str| fmt::Display::fmt(&str, f))
938
}
939
940
941
impl fmt::Display for Symbol {
942
943
- fmt::Display::fmt(&self.as_str(), f)
944
945
946
947
impl Encodable for Symbol {
948
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
949
- s.emit_str(&self.as_str())
+ self.with(|string| s.emit_str(string))
950
951
952
0 commit comments