# HG changeset patch # User Steve Losh # Date 1483375093 0 # Node ID 12700a8dbc356b36d30b53253065f8e4eb2d0b7f # Parent a8e88620b62ce7b3a0555b93b7ffee18a95d0908 Clean up with `:allow-other-keys` on the caller side diff -r a8e88620b62c -r 12700a8dbc35 src/directed-graph.lisp --- a/src/directed-graph.lisp Mon Nov 21 14:32:49 2016 +0000 +++ b/src/directed-graph.lisp Mon Jan 02 16:38:13 2017 +0000 @@ -2,15 +2,12 @@ ;;;; Utils -------------------------------------------------------------------- (defun make-hash-table-portably (&key (size 0) test hash-function) - ;; Only try to pass :hash-function if we were given it, so we don't explode in - ;; implementations that don't support it. - ;; - ;; Also, use `apply` instead of a simple `if` because we don't want spurious - ;; compiler warnings... This is ugly. - (apply #'make-hash-table :test test :size size - (if hash-function - (list :hash-function hash-function) - '()))) + (make-hash-table + :test test + :size size + ;; Don't explode if the implementation doesn't support :hash-function. + :allow-other-keys t + :hash-function hash-function)) ;;;; Data ---------------------------------------------------------------------