@@ -120,12 +120,11 @@ pub fn eprintln(s string) {
120
120
C.fprintf (C.stderr, c '%.*s\n ' , s.len, s.str)
121
121
}
122
122
} $else {
123
- mut n := 0
124
123
if s.str == 0 {
125
- n = C.write (2 , c 'eprintln(NIL)\n ' , 14 )
124
+ _ = C.write (2 , c 'eprintln(NIL)\n ' , 14 )
126
125
} else {
127
- n = C.write (2 , s.str, s.len)
128
- n = C.write (2 , c '\n ' , 1 )
126
+ _ = C.write (2 , s.str, s.len)
127
+ _ = C.write (2 , c '\n ' , 1 )
129
128
}
130
129
}
131
130
C.fflush (C.stderr)
@@ -158,11 +157,10 @@ pub fn eprint(s string) {
158
157
C.fprintf (C.stderr, c '%.*s' , s.len, s.str)
159
158
}
160
159
} $else {
161
- mut n := 0
162
160
if s.str == 0 {
163
- n = C.write (2 , c 'eprint(NIL)' , 11 )
161
+ _ = C.write (2 , c 'eprint(NIL)' , 11 )
164
162
} else {
165
- n = C.write (2 , s.str, s.len)
163
+ _ = C.write (2 , s.str, s.len)
166
164
}
167
165
}
168
166
C.fflush (C.stderr)
@@ -172,7 +170,6 @@ pub fn eprint(s string) {
172
170
// print prints a message to stdout. Unlike `println` stdout is not automatically flushed.
173
171
// A call to `flush()` will flush the output buffer to stdout.
174
172
pub fn print (s string ) {
175
- mut n := 0
176
173
$if android {
177
174
C.fprintf (C.stdout, c '%.*s' , s.len, s.str)
178
175
} $else $if ios {
@@ -181,7 +178,7 @@ pub fn print(s string) {
181
178
} $else $if freestanding {
182
179
bare_print (s.str, u64 (s.len))
183
180
} $else {
184
- n = C.write (1 , s.str, s.len)
181
+ _ = C.write (1 , s.str, s.len)
185
182
}
186
183
}
187
184
@@ -194,7 +191,6 @@ fn C.asl_log(voidptr, voidptr, int, charptr)
194
191
*/
195
192
// println prints a message with a line end, to stdout. stdout is flushed.
196
193
pub fn println (s string ) {
197
- mut n := 0
198
194
if s.str == 0 {
199
195
$if android {
200
196
C.fprintf (C.stdout, c 'println(NIL)\n ' )
@@ -204,7 +200,7 @@ pub fn println(s string) {
204
200
bare_print (s.str, u64 (s.len))
205
201
bare_print (c 'println(NIL)\n ' , 13 )
206
202
} $else {
207
- n = C.write (1 , c 'println(NIL)\n ' , 13 )
203
+ _ = C.write (1 , c 'println(NIL)\n ' , 13 )
208
204
}
209
205
return
210
206
}
@@ -216,8 +212,8 @@ pub fn println(s string) {
216
212
bare_print (s.str, u64 (s.len))
217
213
bare_print (c '\n ' , 1 )
218
214
} $else {
219
- n = C.write (1 , s.str, s.len)
220
- n = C.write (1 , c '\n ' , 1 )
215
+ _ = C.write (1 , s.str, s.len)
216
+ _ = C.write (1 , c '\n ' , 1 )
221
217
}
222
218
}
223
219
0 commit comments