Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

lib/rest: remove unnecessary nil check

Eng Zer Junc4bad5c1bca0
diff --git a/lib/rest/rest.go b/lib/rest/rest.go
index c4fb51b6a..a7bba472b 100644
--- a/lib/rest/rest.go
+++ b/lib/rest/rest.go
@@ -275,10 +275,8 @@ func (api *Client) Call(ctx context.Context, opts *Opts) (resp *http.Response, e
req.Close = true
}
// Set any extra headers
- if opts.ExtraHeaders != nil {
- for k, v := range opts.ExtraHeaders {
- headers[k] = v
- }
+ for k, v := range opts.ExtraHeaders {
+ headers[k] = v
}
// add any options to the headers
fs.OpenOptionAddHeaders(opts.Options, headers)