Fix ‘pcase-exhaustive’ cases

There's more information in the ‘status’ variable than just what I extract. The
‘. ,_’ matches anything else into a discard pattern so that I'm only getting the
data I need.
This commit is contained in:
Tom Willemse 2023-04-12 00:44:02 -07:00
parent 7c531e3ab3
commit 91488f1358

View file

@ -95,7 +95,7 @@
(defun tekuti--send-finished (status buffer args) (defun tekuti--send-finished (status buffer args)
(pcase-exhaustive status (pcase-exhaustive status
(`(:redirect ,url) (`(:redirect ,url . ,_)
(save-excursion (save-excursion
(with-current-buffer buffer (with-current-buffer buffer
(goto-char (point-min)) (goto-char (point-min))
@ -111,7 +111,7 @@
(insert "#+" key ": " value "\n")))) (insert "#+" key ": " value "\n"))))
args)))) args))))
(message "Created new post: %s" url)) (message "Created new post: %s" url))
(`(:error (error http ,code)) (`(:error (error http ,code) . ,_)
(message "Failed to create post: %d" code)))) (message "Failed to create post: %d" code))))
;;;###autoload ;;;###autoload