File tree 8 files changed +1
-138
lines changed 8 files changed +1
-138
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ impl Iterator for Vars {
179
179
impl fmt:: Debug for Vars {
180
180
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
181
181
let Self { inner : VarsOs { inner } } = self ;
182
- f. debug_struct ( "Vars" ) . field ( "inner" , & inner. str_debug ( ) ) . finish ( )
182
+ f. debug_struct ( "Vars" ) . field ( "inner" , inner) . finish ( )
183
183
}
184
184
}
185
185
Original file line number Diff line number Diff line change @@ -112,27 +112,6 @@ pub struct Env {
112
112
iter : vec:: IntoIter < ( OsString , OsString ) > ,
113
113
}
114
114
115
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
116
- pub struct EnvStrDebug < ' a > {
117
- slice : & ' a [ ( OsString , OsString ) ] ,
118
- }
119
-
120
- impl fmt:: Debug for EnvStrDebug < ' _ > {
121
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
122
- let Self { slice } = self ;
123
- f. debug_list ( )
124
- . entries ( slice. iter ( ) . map ( |( a, b) | ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) )
125
- . finish ( )
126
- }
127
- }
128
-
129
- impl Env {
130
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
131
- let Self { iter } = self ;
132
- EnvStrDebug { slice : iter. as_slice ( ) }
133
- }
134
- }
135
-
136
115
impl fmt:: Debug for Env {
137
116
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
138
117
let Self { iter } = self ;
Original file line number Diff line number Diff line change @@ -100,27 +100,6 @@ pub struct Env {
100
100
iter : vec:: IntoIter < ( OsString , OsString ) > ,
101
101
}
102
102
103
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
104
- pub struct EnvStrDebug < ' a > {
105
- slice : & ' a [ ( OsString , OsString ) ] ,
106
- }
107
-
108
- impl fmt:: Debug for EnvStrDebug < ' _ > {
109
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
110
- let Self { slice } = self ;
111
- f. debug_list ( )
112
- . entries ( slice. iter ( ) . map ( |( a, b) | ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) )
113
- . finish ( )
114
- }
115
- }
116
-
117
- impl Env {
118
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
119
- let Self { iter } = self ;
120
- EnvStrDebug { slice : iter. as_slice ( ) }
121
- }
122
- }
123
-
124
103
impl fmt:: Debug for Env {
125
104
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
126
105
let Self { iter } = self ;
Original file line number Diff line number Diff line change @@ -89,27 +89,6 @@ pub struct Env {
89
89
iter : vec:: IntoIter < ( OsString , OsString ) > ,
90
90
}
91
91
92
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
93
- pub struct EnvStrDebug < ' a > {
94
- slice : & ' a [ ( OsString , OsString ) ] ,
95
- }
96
-
97
- impl fmt:: Debug for EnvStrDebug < ' _ > {
98
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
99
- let Self { slice } = self ;
100
- f. debug_list ( )
101
- . entries ( slice. iter ( ) . map ( |( a, b) | ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) )
102
- . finish ( )
103
- }
104
- }
105
-
106
- impl Env {
107
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
108
- let Self { iter } = self ;
109
- EnvStrDebug { slice : iter. as_slice ( ) }
110
- }
111
- }
112
-
113
92
impl fmt:: Debug for Env {
114
93
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
115
94
let Self { iter } = self ;
Original file line number Diff line number Diff line change @@ -540,27 +540,6 @@ pub struct Env {
540
540
iter : vec:: IntoIter < ( OsString , OsString ) > ,
541
541
}
542
542
543
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
544
- pub struct EnvStrDebug < ' a > {
545
- slice : & ' a [ ( OsString , OsString ) ] ,
546
- }
547
-
548
- impl fmt:: Debug for EnvStrDebug < ' _ > {
549
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
550
- let Self { slice } = self ;
551
- f. debug_list ( )
552
- . entries ( slice. iter ( ) . map ( |( a, b) | ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) )
553
- . finish ( )
554
- }
555
- }
556
-
557
- impl Env {
558
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
559
- let Self { iter } = self ;
560
- EnvStrDebug { slice : iter. as_slice ( ) }
561
- }
562
- }
563
-
564
543
impl fmt:: Debug for Env {
565
544
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
566
545
let Self { iter } = self ;
Original file line number Diff line number Diff line change @@ -65,14 +65,6 @@ pub fn current_exe() -> io::Result<PathBuf> {
65
65
66
66
pub struct Env ( !) ;
67
67
68
- impl Env {
69
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
70
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
71
- let Self ( inner) = self ;
72
- match * inner { }
73
- }
74
- }
75
-
76
68
impl fmt:: Debug for Env {
77
69
fn fmt ( & self , _: & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
78
70
let Self ( inner) = self ;
Original file line number Diff line number Diff line change @@ -147,27 +147,6 @@ pub struct Env {
147
147
iter : vec:: IntoIter < ( OsString , OsString ) > ,
148
148
}
149
149
150
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
151
- pub struct EnvStrDebug < ' a > {
152
- slice : & ' a [ ( OsString , OsString ) ] ,
153
- }
154
-
155
- impl fmt:: Debug for EnvStrDebug < ' _ > {
156
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
157
- let Self { slice } = self ;
158
- f. debug_list ( )
159
- . entries ( slice. iter ( ) . map ( |( a, b) | ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) )
160
- . finish ( )
161
- }
162
- }
163
-
164
- impl Env {
165
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
166
- let Self { iter } = self ;
167
- EnvStrDebug { slice : iter. as_slice ( ) }
168
- }
169
- }
170
-
171
150
impl fmt:: Debug for Env {
172
151
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
173
152
let Self { iter } = self ;
Original file line number Diff line number Diff line change @@ -84,30 +84,6 @@ pub struct Env {
84
84
iter : EnvIterator ,
85
85
}
86
86
87
- // FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
88
- pub struct EnvStrDebug < ' a > {
89
- iter : & ' a EnvIterator ,
90
- }
91
-
92
- impl fmt:: Debug for EnvStrDebug < ' _ > {
93
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
94
- let Self { iter } = self ;
95
- let iter: EnvIterator = ( * iter) . clone ( ) ;
96
- let mut list = f. debug_list ( ) ;
97
- for ( a, b) in iter {
98
- list. entry ( & ( a. to_str ( ) . unwrap ( ) , b. to_str ( ) . unwrap ( ) ) ) ;
99
- }
100
- list. finish ( )
101
- }
102
- }
103
-
104
- impl Env {
105
- pub fn str_debug ( & self ) -> impl fmt:: Debug + ' _ {
106
- let Self { base : _, iter } = self ;
107
- EnvStrDebug { iter }
108
- }
109
- }
110
-
111
87
impl fmt:: Debug for Env {
112
88
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
113
89
let Self { base : _, iter } = self ;
You can’t perform that action at this time.
0 commit comments