remove excessive []byte(s) conversion
`copy` permits using to mix `[]byte` and `string` arguments without explicit conversion. I removed explicit conversion to make the code simpler. Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
This commit is contained in:
		 Iskander (Alex) Sharipov
					Iskander (Alex) Sharipov
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							9f705f40b8
						
					
				
				
					commit
					dfebb404cb
				
			| @@ -70,9 +70,9 @@ func (h Bar) Format(state fmt.State, r rune) { | ||||
| 	negative := width - pad - positive | ||||
|  | ||||
| 	n := 1 | ||||
| 	n += copy(p[n:], []byte(green)) | ||||
| 	n += copy(p[n:], green) | ||||
| 	n += copy(p[n:], bytes.Repeat([]byte("+"), positive)) | ||||
| 	n += copy(p[n:], []byte(reset)) | ||||
| 	n += copy(p[n:], reset) | ||||
|  | ||||
| 	if negative > 0 { | ||||
| 		copy(p[n:len(p)-1], bytes.Repeat([]byte("-"), negative)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user