File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ impl Write for BuildScriptWriter {
8686 // so we need to lock it to prevent other threads from clobbering our output.
8787 let mut writer = writer. lock ( ) ;
8888
89+ // depending on the current state we may need to prefix the output
8990 match * state {
9091 ErrorAndWarnState :: Init => {
9192 writer. write_all ( b"cargo::warning=" ) ?;
@@ -110,9 +111,7 @@ impl Write for BuildScriptWriter {
110111 // We know which case we are in
111112 // either when we enter this function the next time (case 1)
112113 // or the next time or when we enter the destructor (case 2).
113- let last_char = buf. last ( ) . copied ( ) ;
114-
115- match last_char {
114+ match buf. last ( ) . copied ( ) {
116115 Some ( ch) if char_is_special ( ch) => {
117116 // we strip the special char at the end so that the call to split
118117 // does not yield an empty slice in the end
You can’t perform that action at this time.
0 commit comments