diff --git a/Cargo.lock b/Cargo.lock index 6eed779..314300d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "getopts" version = "0.2.21" @@ -11,7 +13,7 @@ dependencies = [ [[package]] name = "jsonxf" -version = "1.1.1" +version = "1.1.2" dependencies = [ "getopts", "memchr", @@ -19,12 +21,12 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "unicode-width" -version = "0.1.7" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" diff --git a/Cargo.toml b/Cargo.toml index 58b85ee..e791fca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "jsonxf" -version = "1.1.1" +edition = "2015" +version = "1.1.2" authors = ["pete gamache "] description = "A fast JSON pretty-printer and minimizer." homepage = "https://github.com/gamache/jsonxf" @@ -10,8 +11,11 @@ categories = ["encoding", "rendering", "text-processing", "value-formatting"] license = "MIT" [dependencies] -getopts = "0.2" -memchr = "2.3.4" +getopts = { version = "0.2", optional = true } +memchr = "2.7.4" + +[features] +default = ["dep:getopts"] [lib] name = "jsonxf" diff --git a/README.md b/README.md index 04de4af..974e4c8 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ In your `Cargo.toml`: ``` [dependencies] -jsonxf = "1.1" +jsonxf = { version = "1.1.2", default-features = false } ``` In your code: @@ -50,7 +50,7 @@ In your code: extern crate jsonxf; let ugly_json = "{\"hello\":\"world\"}"; let pretty_json = jsonxf::pretty_print(ugly_json).unwrap(); -assert_eq!(pretty_json, "{\n \"hello\": \"world\"\n}\n"); +assert_eq!(pretty_json, "{\n \"hello\": \"world\"\n}"); ```