Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change midje dep and (map int xs) for ints.

  • Loading branch information...
commit 8c96bec2aecca219d84ac7431b9627e1efadee2f 1 parent 9c0d56a
@eightysteele eightysteele authored
Showing with 4 additions and 8 deletions.
  1. +2 −0  .gitignore
  2. +1 −1  project.clj
  3. +1 −7 src/clj/forma/thrift.clj
View
2  .gitignore
@@ -1,4 +1,6 @@
credentials.json
+#*.*#
+.#*
.#
pom.xml
.cake
View
2  project.clj
@@ -28,7 +28,7 @@
:exclusions [org.slf4j/slf4j-api]]]
:aot [forma.hadoop.pail, forma.schema, #"forma.hadoop.jobs.*"]
:profiles {:dev {:dependencies [[org.apache.hadoop/hadoop-core "0.20.2-dev"]
- [midje-cascalog "0.4.0"]
+ [eightysteele/midje-cascalog "0.5.0"]
[incanter/incanter-charts "1.3.0"]]
:plugins [[lein-swank "1.4.4"]
[lein-midje "2.0.0-SNAPSHOT"]
View
8 src/clj/forma/thrift.clj
@@ -143,17 +143,11 @@
(try (f x)
(catch Exception e nil)))))
-(defn box-int
- "Clojure automatically coerces primitive ints to longs. For Thrift, we need
- ints, so this helper function boxes an integer value to avoid that coercion."
- [x]
- (Integer. (.intValue x)))
-
(defn int-struct
"Return a IntArray that contains all numbers in the supplied sequence cast
to ints."
[xs]
- (let [ints (map box-int xs)]
+ (let [ints (map int xs)]
(doto (IntArray.)
(.setInts ints))))
Please sign in to comment.
Something went wrong with that request. Please try again.