Skip to content

Commit

Permalink
Upgrade to Clojure 1.9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Dec 24, 2017
1 parent 955f1e7 commit 5d57907
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,7 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

...
### Changed
- Upgrade to Clojure 1.9.0.

## [0.5.0] - 2017-11-08

Expand Down
10 changes: 5 additions & 5 deletions project.clj
@@ -1,4 +1,4 @@
(defproject mvxcvi/clj-cbor "0.5.1-SNAPSHOT"
(defproject mvxcvi/clj-cbor "0.6.0-SNAPSHOT"
:description "Concise Binary Object Representation (RFC 7049)"
:url "https://github.com/greglook/clj-cbor"
:license {:name "Public Domain"
Expand All @@ -12,7 +12,7 @@
"bench-repl" ["with-profile" "+bench" "repl"]}

:dependencies
[[org.clojure/clojure "1.8.0"]]
[[org.clojure/clojure "1.9.0"]]

:test-selectors
{:default (complement :generative)
Expand Down Expand Up @@ -41,8 +41,8 @@
:bench
{:source-paths ["dev"]
:dependencies
[[com.cognitect/transit-clj "0.8.297"]
[com.taoensso/nippy "2.12.2"]
[[com.cognitect/transit-clj "0.8.300"]
[com.taoensso/nippy "2.14.0"]
[criterium "0.4.4"]
[mvxcvi/blocks "0.8.0"]
[mvxcvi/blocks "1.0.0"]
[org.clojure/data.fressian "0.2.1"]]}})
8 changes: 1 addition & 7 deletions src/clj_cbor/codec.clj
Expand Up @@ -553,12 +553,6 @@
;; Like the major types for integers, items of this major type do not carry
;; content data; all the information is in the initial bytes.

(defn- boolean?
"Predicate which returns true if `x` is a boolean value."
[x]
(or (true? x) (false? x)))


(defn- write-boolean
"Writes a boolean simple value to the output."
[encoder ^DataOutputStream out x]
Expand Down Expand Up @@ -685,7 +679,7 @@
; Byte and text strings
(char? x) (write-text-string codec out (str x))
(string? x) (write-text-string codec out x)
(data/bytes? x) (write-byte-string codec out x)
(bytes? x) (write-byte-string codec out x)

; Tag extensions
(data/tagged-value? x) (write-tagged codec out x)
Expand Down
1 change: 1 addition & 0 deletions src/clj_cbor/core.clj
Expand Up @@ -80,6 +80,7 @@

(defn- data-output-stream
"Coerce the argument to a `DataOutputStream`."
^DataOutputStream
[input]
(if (instance? DataOutputStream input)
input
Expand Down
7 changes: 0 additions & 7 deletions src/clj_cbor/data/core.clj
Expand Up @@ -40,13 +40,6 @@
0)))


(let [byte-array-class (class (byte-array 0))]
(defn bytes?
"Predicate which returns true if `x` is a byte-array."
[x]
(instance? byte-array-class x)))



;; ## Simple Values

Expand Down
4 changes: 2 additions & 2 deletions src/clj_cbor/tags/numbers.clj
Expand Up @@ -45,7 +45,7 @@

(defn parse-positive-bignum
[value]
(when-not (data/bytes? value)
(when-not (bytes? value)
(throw (ex-info (str "Bignums must be represented as a tagged byte string, got: "
(class value))
{:value value})))
Expand All @@ -54,7 +54,7 @@

(defn parse-negative-bignum
[value]
(when-not (data/bytes? value)
(when-not (bytes? value)
(throw (ex-info (str "Bignums must be represented as a tagged byte string, got: "
(class value))
{:value value})))
Expand Down
2 changes: 1 addition & 1 deletion src/clj_cbor/tags/text.clj
Expand Up @@ -75,7 +75,7 @@

(defn parse-uuid
[value]
(when-not (data/bytes? value)
(when-not (bytes? value)
(throw (ex-info (str "UUIDs must be tagged byte strings, got: "
(class value))
{:value value})))
Expand Down
3 changes: 1 addition & 2 deletions test/clj_cbor/test_utils.clj
Expand Up @@ -2,8 +2,7 @@
(:require
[clojure.test :refer :all]
[clj-cbor.core :as cbor]
[clj-cbor.error :as error]
[clj-cbor.data.core :refer [bytes?]])
[clj-cbor.error :as error])
(:import
(java.util
Collection
Expand Down

0 comments on commit 5d57907

Please sign in to comment.