From 09c36f11c3f67476f322456e7186f7cd3c084014 Mon Sep 17 00:00:00 2001 From: Ali Naqvi Date: Mon, 22 Jun 2020 14:09:24 +0800 Subject: [PATCH] Updated for Crystal 0.35.1 --- shard.yml | 4 ++-- src/xz.cr | 2 +- src/xz/writer.cr | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/shard.yml b/shard.yml index d287336..13c4155 100644 --- a/shard.yml +++ b/shard.yml @@ -1,11 +1,11 @@ name: xz -version: 0.1.2 +version: 0.1.3 authors: - Ali Naqvi description: | Crystal bindings to the XZ (lzma) compression library. -crystal: 0.35.0 +crystal: 0.35.1 license: MIT diff --git a/src/xz.cr b/src/xz.cr index 4c489ab..9c0adc7 100644 --- a/src/xz.cr +++ b/src/xz.cr @@ -2,7 +2,7 @@ require "semantic_version" module Compress::XZ - VERSION = "0.1.2" + VERSION = "0.1.3" LZMA_VERSION = SemanticVersion.parse String.new(LZMA.version_string) LZMA_VERSION_MINIMUM = SemanticVersion.parse("5.2.4") diff --git a/src/xz/writer.cr b/src/xz/writer.cr index 2171444..3b29fa1 100644 --- a/src/xz/writer.cr +++ b/src/xz/writer.cr @@ -80,15 +80,14 @@ class Compress::XZ::Writer < IO end # See `IO#write`. - def write(slice : Bytes) : Int64 + def write(slice : Bytes) : Nil check_open - return 0i64 if slice.empty? + return if slice.empty? @stream.next_in = slice.to_unsafe @stream.avail_in = slice.size do_action LZMA::Action::Run - slice.size.to_i64 end # See `IO#flush`.