mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 21:12:45 +00:00
Fix newly found linter issues (#3099)
Fixes the issues found in https://github.com/matrix-org/dendrite/actions/runs/5155539352/jobs/9285342056#step:5:22. Only naked returns in longer functions.
This commit is contained in:
parent
ea6b368ad4
commit
d11da6ec7c
4 changed files with 10 additions and 9 deletions
|
@ -644,7 +644,7 @@ func (d *Database) CreateDevice(
|
|||
for i := 1; i <= 5; i++ {
|
||||
newDeviceID, returnErr = generateDeviceID()
|
||||
if returnErr != nil {
|
||||
return
|
||||
return nil, returnErr
|
||||
}
|
||||
|
||||
returnErr = d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
|
||||
|
@ -653,7 +653,7 @@ func (d *Database) CreateDevice(
|
|||
return err
|
||||
})
|
||||
if returnErr == nil {
|
||||
return
|
||||
return dev, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue