debug: use slice Stale sort (#6263)
Co-authored-by: hanwang <hanwang.7721@bytedance.com>
This commit is contained in:
		
							parent
							
								
									407bedae0a
								
							
						
					
					
						commit
						aeb298635b
					
				| @ -249,7 +249,7 @@ func sortCallbacks(cs []*callback) (fns []func(*DB), err error) { | |||||||
| 		names, sorted []string | 		names, sorted []string | ||||||
| 		sortCallback  func(*callback) error | 		sortCallback  func(*callback) error | ||||||
| 	) | 	) | ||||||
| 	sort.Slice(cs, func(i, j int) bool { | 	sort.SliceStable(cs, func(i, j int) bool { | ||||||
| 		if cs[j].before == "*" && cs[i].before != "*" { | 		if cs[j].before == "*" && cs[i].before != "*" { | ||||||
| 			return true | 			return true | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 hanwn
						hanwn