mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
Comment on err being a named return
This commit is contained in:
parent
a935ef623d
commit
d4563ef6d3
|
|
@ -18,6 +18,7 @@ func updateLatestEvents(
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Commit if there wasn't an error.
|
// Commit if there wasn't an error.
|
||||||
// Set the returned err value if we encounter an error committing.
|
// Set the returned err value if we encounter an error committing.
|
||||||
|
// This only works because err is a named return.
|
||||||
err = updater.Close(true)
|
err = updater.Close(true)
|
||||||
} else {
|
} else {
|
||||||
// Ignore any error we get rolling back since we don't want to
|
// Ignore any error we get rolling back since we don't want to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue