You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For MoveBefore, if e == mark.prev, we can do nothing,
MoveAfter also a reason
If I remember correctly, MoveBefore originally had such pr, also accepted, but not now how, and who can give me a reply
// MoveBefore moves element e to its new position before mark.// If e or mark is not an element of l, or e == mark, the list is not modified.func (l*List) MoveBefore(e, mark*Element) {
ife.list!=l||mark.list!=l||e==mark||e==mark.prev{
return
}
l.insert(l.remove(e), mark.prev)
}
// MoveAfter moves element e to its new position after mark.// If e or mark is not an element of l, or e == mark, the list is not modified.func (l*List) MoveAfter(e, mark*Element) {
ife.list!=l||mark.list!=l||e==mark||e==mark.next {
return
}
l.insert(l.remove(e), mark)
}
The text was updated successfully, but these errors were encountered:
This is better discussed on the golang-dev@ mailing list. But unless there's a bug or major performance problem, we're unlikely to accept any changes to this code. This code is effectively frozen.
https://github.com/golang/go/blob/master/src/container/list/list.go#L185
https://github.com/golang/go/blob/master/src/container/list/list.go#L194
For MoveBefore, if e == mark.prev, we can do nothing,
MoveAfter also a reason
If I remember correctly, MoveBefore originally had such pr, also accepted, but not now how, and who can give me a reply
The text was updated successfully, but these errors were encountered: