File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -560,11 +560,8 @@ func (c *Conn) execSend(query string) error {
560560func  (c  * Conn ) CapabilityString () string  {
561561capability  :=  c .capability 
562562caps  :=  make ([]string , 0 , bits .OnesCount32 (capability ))
563- for  i  :=  0 ; capability  !=  0 ; i ++  {
564- field  :=  uint32 (1  <<  i )
565- if  capability & field  ==  0  {
566- continue 
567- }
563+ for  capability  !=  0  {
564+ field  :=  uint32 (1  <<  bits .TrailingZeros32 (capability ))
568565capability  ^=  field 
569566
570567switch  field  {
@@ -645,11 +642,8 @@ func (c *Conn) CapabilityString() string {
645642func  (c  * Conn ) StatusString () string  {
646643status  :=  c .status 
647644stats  :=  make ([]string , 0 , bits .OnesCount16 (status ))
648- for  i  :=  0 ; status  !=  0 ; i ++  {
649- field  :=  uint16 (1  <<  i )
650- if  status & field  ==  0  {
651- continue 
652- }
645+ for  status  !=  0  {
646+ field  :=  uint16 (1  <<  bits .TrailingZeros16 (status ))
653647status  ^=  field 
654648
655649switch  field  {
                         You can’t perform that action at this time. 
           
                  
0 commit comments