drop dependency on failure crate
This commit is contained in:
parent
af37164fba
commit
1704f7fe80
|
@ -10,15 +10,6 @@ dependencies = [
|
|||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
|
@ -69,7 +60,6 @@ dependencies = [
|
|||
"chrono",
|
||||
"coarsetime",
|
||||
"env_logger",
|
||||
"failure",
|
||||
"flate2",
|
||||
"fluent",
|
||||
"fluent-bundle",
|
||||
|
@ -255,20 +245,6 @@ version = "1.0.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.56"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
"object",
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.12.3"
|
||||
|
@ -549,28 +525,6 @@ dependencies = [
|
|||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"failure_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure_derive"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fallible-iterator"
|
||||
version = "0.2.0"
|
||||
|
@ -852,12 +806,6 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.2.7"
|
||||
|
@ -1484,12 +1432,6 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.7.2"
|
||||
|
@ -2133,12 +2075,6 @@ dependencies = [
|
|||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "1.1.0"
|
||||
|
@ -2484,18 +2420,6 @@ dependencies = [
|
|||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.12.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "take_mut"
|
||||
version = "0.2.2"
|
||||
|
|
|
@ -21,16 +21,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.Inflector-0.11.4.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__addr2line__0_14_1",
|
||||
url = "https://crates.io/api/v1/crates/addr2line/0.14.1/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7",
|
||||
strip_prefix = "addr2line-0.14.1",
|
||||
build_file = Label("//cargo/remote:BUILD.addr2line-0.14.1.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__adler__1_0_2",
|
||||
|
@ -201,16 +191,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.autocfg-1.0.1.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__backtrace__0_3_56",
|
||||
url = "https://crates.io/api/v1/crates/backtrace/0.3.56/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc",
|
||||
strip_prefix = "backtrace-0.3.56",
|
||||
build_file = Label("//cargo/remote:BUILD.backtrace-0.3.56.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__base64__0_12_3",
|
||||
|
@ -531,26 +511,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.env_logger-0.8.3.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__failure__0_1_8",
|
||||
url = "https://crates.io/api/v1/crates/failure/0.1.8/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86",
|
||||
strip_prefix = "failure-0.1.8",
|
||||
build_file = Label("//cargo/remote:BUILD.failure-0.1.8.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__failure_derive__0_1_8",
|
||||
url = "https://crates.io/api/v1/crates/failure_derive/0.1.8/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4",
|
||||
strip_prefix = "failure_derive-0.1.8",
|
||||
build_file = Label("//cargo/remote:BUILD.failure_derive-0.1.8.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__fallible_iterator__0_2_0",
|
||||
|
@ -851,16 +811,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.ghost-0.1.2.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__gimli__0_23_0",
|
||||
url = "https://crates.io/api/v1/crates/gimli/0.23.0/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce",
|
||||
strip_prefix = "gimli-0.23.0",
|
||||
build_file = Label("//cargo/remote:BUILD.gimli-0.23.0.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__h2__0_2_7",
|
||||
|
@ -1491,16 +1441,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.num_enum_derive-0.5.1.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__object__0_23_0",
|
||||
url = "https://crates.io/api/v1/crates/object/0.23.0/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4",
|
||||
strip_prefix = "object-0.23.0",
|
||||
build_file = Label("//cargo/remote:BUILD.object-0.23.0.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__once_cell__1_7_2",
|
||||
|
@ -2111,16 +2051,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.rust-argon2-0.8.3.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__rustc_demangle__0_1_18",
|
||||
url = "https://crates.io/api/v1/crates/rustc-demangle/0.1.18/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232",
|
||||
strip_prefix = "rustc-demangle-0.1.18",
|
||||
build_file = Label("//cargo/remote:BUILD.rustc-demangle-0.1.18.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__rustc_hash__1_1_0",
|
||||
|
@ -2481,16 +2411,6 @@ def raze_fetch_remote_crates():
|
|||
build_file = Label("//cargo/remote:BUILD.syn-1.0.65.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__synstructure__0_12_4",
|
||||
url = "https://crates.io/api/v1/crates/synstructure/0.12.4/download",
|
||||
type = "tar.gz",
|
||||
sha256 = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701",
|
||||
strip_prefix = "synstructure-0.12.4",
|
||||
build_file = Label("//cargo/remote:BUILD.synstructure-0.12.4.bazel"),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "raze__take_mut__0_2_2",
|
||||
|
|
|
@ -8,15 +8,6 @@
|
|||
"license_file": null,
|
||||
"description": "Adds String based inflections for Rust. Snake, kebab, camel, sentence, class, title and table cases as well as ordinalize, deordinalize, demodulize, foreign key, and pluralize/singularize are supported as both traits and pure functions acting on String types."
|
||||
},
|
||||
{
|
||||
"name": "addr2line",
|
||||
"version": "0.14.1",
|
||||
"authors": "Nick Fitzgerald <fitzgen@gmail.com>|Philip Craig <philipjcraig@gmail.com>|Jon Gjengset <jon@thesquareplanet.com>|Noah Bergbauer <noah.bergbauer@tum.de>",
|
||||
"repository": "https://github.com/gimli-rs/addr2line",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "A cross-platform symbolication library written in Rust, using `gimli`"
|
||||
},
|
||||
{
|
||||
"name": "adler",
|
||||
"version": "1.0.2",
|
||||
|
@ -197,15 +188,6 @@
|
|||
"license_file": null,
|
||||
"description": "Automatic cfg for Rust compiler features"
|
||||
},
|
||||
{
|
||||
"name": "backtrace",
|
||||
"version": "0.3.56",
|
||||
"authors": "The Rust Project Developers",
|
||||
"repository": "https://github.com/rust-lang/backtrace-rs",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "A library to acquire a stack trace (backtrace) at runtime in a Rust program."
|
||||
},
|
||||
{
|
||||
"name": "base64",
|
||||
"version": "0.12.3",
|
||||
|
@ -494,24 +476,6 @@
|
|||
"license_file": null,
|
||||
"description": "A logging implementation for `log` which is configured via an environment variable."
|
||||
},
|
||||
{
|
||||
"name": "failure",
|
||||
"version": "0.1.8",
|
||||
"authors": "Without Boats <boats@mozilla.com>",
|
||||
"repository": "https://github.com/rust-lang-nursery/failure",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "Experimental error handling abstraction."
|
||||
},
|
||||
{
|
||||
"name": "failure_derive",
|
||||
"version": "0.1.8",
|
||||
"authors": "Without Boats <woboats@gmail.com>",
|
||||
"repository": "https://github.com/rust-lang-nursery/failure",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "derives for the failure crate"
|
||||
},
|
||||
{
|
||||
"name": "fallible-iterator",
|
||||
"version": "0.2.0",
|
||||
|
@ -782,15 +746,6 @@
|
|||
"license_file": null,
|
||||
"description": "Define your own PhantomData"
|
||||
},
|
||||
{
|
||||
"name": "gimli",
|
||||
"version": "0.23.0",
|
||||
"authors": "Nick Fitzgerald <fitzgen@gmail.com>|Philip Craig <philipjcraig@gmail.com>",
|
||||
"repository": "https://github.com/gimli-rs/gimli",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "A library for reading and writing the DWARF debugging format."
|
||||
},
|
||||
{
|
||||
"name": "h2",
|
||||
"version": "0.2.7",
|
||||
|
@ -1358,15 +1313,6 @@
|
|||
"license_file": null,
|
||||
"description": "Internal implementation details for ::num_enum (Procedural macros to make inter-operation between primitives and enums easier)"
|
||||
},
|
||||
{
|
||||
"name": "object",
|
||||
"version": "0.23.0",
|
||||
"authors": "Nick Fitzgerald <fitzgen@gmail.com>|Philip Craig <philipjcraig@gmail.com>",
|
||||
"repository": "https://github.com/gimli-rs/object",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "A unified interface for reading and writing object file formats."
|
||||
},
|
||||
{
|
||||
"name": "once_cell",
|
||||
"version": "1.7.2",
|
||||
|
@ -1925,15 +1871,6 @@
|
|||
"license_file": null,
|
||||
"description": "Rust implementation of the Argon2 password hashing function."
|
||||
},
|
||||
{
|
||||
"name": "rustc-demangle",
|
||||
"version": "0.1.18",
|
||||
"authors": "Alex Crichton <alex@alexcrichton.com>",
|
||||
"repository": "https://github.com/alexcrichton/rustc-demangle",
|
||||
"license": "Apache-2.0 OR MIT",
|
||||
"license_file": null,
|
||||
"description": "Rust compiler symbol demangling."
|
||||
},
|
||||
{
|
||||
"name": "rustc-hash",
|
||||
"version": "1.1.0",
|
||||
|
@ -2258,15 +2195,6 @@
|
|||
"license_file": null,
|
||||
"description": "Parser for Rust source code"
|
||||
},
|
||||
{
|
||||
"name": "synstructure",
|
||||
"version": "0.12.4",
|
||||
"authors": "Nika Layzell <nika@thelayzells.com>",
|
||||
"repository": "https://github.com/mystor/synstructure",
|
||||
"license": "MIT",
|
||||
"license_file": null,
|
||||
"description": "Helper methods and macros for custom derives"
|
||||
},
|
||||
{
|
||||
"name": "take_mut",
|
||||
"version": "0.2.2",
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # Apache-2.0 from expression "Apache-2.0 OR MIT"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
# Unsupported target "addr2line" with type "example" omitted
|
||||
|
||||
rust_library(
|
||||
name = "addr2line",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2015",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.14.1",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
"@raze__gimli__0_23_0//:gimli",
|
||||
],
|
||||
)
|
||||
|
||||
# Unsupported target "correctness" with type "test" omitted
|
||||
|
||||
# Unsupported target "output_equivalence" with type "test" omitted
|
||||
|
||||
# Unsupported target "parse" with type "test" omitted
|
|
@ -1,90 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # MIT from expression "MIT OR Apache-2.0"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
# Unsupported target "benchmarks" with type "bench" omitted
|
||||
|
||||
# Unsupported target "backtrace" with type "example" omitted
|
||||
|
||||
# Unsupported target "raw" with type "example" omitted
|
||||
|
||||
rust_library(
|
||||
name = "backtrace",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
aliases = {
|
||||
},
|
||||
crate_features = [
|
||||
"addr2line",
|
||||
"default",
|
||||
"gimli-symbolize",
|
||||
"miniz_oxide",
|
||||
"object",
|
||||
"std",
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2018",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.3.56",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
"@raze__addr2line__0_14_1//:addr2line",
|
||||
"@raze__cfg_if__1_0_0//:cfg_if",
|
||||
"@raze__libc__0_2_91//:libc",
|
||||
"@raze__miniz_oxide__0_4_4//:miniz_oxide",
|
||||
"@raze__object__0_23_0//:object",
|
||||
"@raze__rustc_demangle__0_1_18//:rustc_demangle",
|
||||
] + selects.with_or({
|
||||
# cfg(windows)
|
||||
(
|
||||
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
|
||||
): [
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
# Unsupported target "accuracy" with type "test" omitted
|
||||
|
||||
# Unsupported target "concurrent-panics" with type "test" omitted
|
||||
|
||||
# Unsupported target "long_fn_name" with type "test" omitted
|
||||
|
||||
# Unsupported target "skip_inner_frames" with type "test" omitted
|
||||
|
||||
# Unsupported target "smoke" with type "test" omitted
|
|
@ -1,76 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # MIT from expression "MIT OR Apache-2.0"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
# Unsupported target "bail_ensure" with type "example" omitted
|
||||
|
||||
# Unsupported target "error_as_cause" with type "example" omitted
|
||||
|
||||
# Unsupported target "simple" with type "example" omitted
|
||||
|
||||
# Unsupported target "string_custom_error_pattern" with type "example" omitted
|
||||
|
||||
rust_library(
|
||||
name = "failure",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
"backtrace",
|
||||
"default",
|
||||
"derive",
|
||||
"failure_derive",
|
||||
"std",
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2015",
|
||||
proc_macro_deps = [
|
||||
"@raze__failure_derive__0_1_8//:failure_derive",
|
||||
],
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.1.8",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
"@raze__backtrace__0_3_56//:backtrace",
|
||||
],
|
||||
)
|
||||
|
||||
# Unsupported target "basic_fail" with type "test" omitted
|
||||
|
||||
# Unsupported target "fail_compat" with type "test" omitted
|
||||
|
||||
# Unsupported target "macro_trailing_comma" with type "test" omitted
|
|
@ -1,97 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # MIT from expression "MIT OR Apache-2.0"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
# buildifier: disable=out-of-order-load
|
||||
# buildifier: disable=load-on-top
|
||||
load(
|
||||
"@rules_rust//cargo:cargo_build_script.bzl",
|
||||
"cargo_build_script",
|
||||
)
|
||||
|
||||
cargo_build_script(
|
||||
name = "failure_derive_build_script",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
build_script_env = {
|
||||
},
|
||||
crate_features = [
|
||||
],
|
||||
crate_root = "build.rs",
|
||||
data = glob(["**"]),
|
||||
edition = "2015",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.1.8",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
||||
rust_library(
|
||||
name = "failure_derive",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "proc-macro",
|
||||
data = [],
|
||||
edition = "2015",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.1.8",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
":failure_derive_build_script",
|
||||
"@raze__proc_macro2__1_0_24//:proc_macro2",
|
||||
"@raze__quote__1_0_9//:quote",
|
||||
"@raze__syn__1_0_65//:syn",
|
||||
"@raze__synstructure__0_12_4//:synstructure",
|
||||
],
|
||||
)
|
||||
|
||||
# Unsupported target "backtrace" with type "test" omitted
|
||||
|
||||
# Unsupported target "custom_type_bounds" with type "test" omitted
|
||||
|
||||
# Unsupported target "no_derive_display" with type "test" omitted
|
||||
|
||||
# Unsupported target "tests" with type "test" omitted
|
||||
|
||||
# Unsupported target "wraps" with type "test" omitted
|
|
@ -1,68 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # Apache-2.0 from expression "Apache-2.0 OR MIT"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
# Unsupported target "bench" with type "bench" omitted
|
||||
|
||||
# Unsupported target "dwarf-validate" with type "example" omitted
|
||||
|
||||
# Unsupported target "dwarfdump" with type "example" omitted
|
||||
|
||||
# Unsupported target "simple" with type "example" omitted
|
||||
|
||||
# Unsupported target "simple_line" with type "example" omitted
|
||||
|
||||
rust_library(
|
||||
name = "gimli",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
"read",
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2018",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.23.0",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
||||
# Unsupported target "convert_self" with type "test" omitted
|
||||
|
||||
# Unsupported target "parse_self" with type "test" omitted
|
|
@ -1,76 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # Apache-2.0 from expression "Apache-2.0 OR MIT"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
# Unsupported target "ar" with type "example" omitted
|
||||
|
||||
# Unsupported target "nm" with type "example" omitted
|
||||
|
||||
# Unsupported target "objcopy" with type "example" omitted
|
||||
|
||||
# Unsupported target "objdump" with type "example" omitted
|
||||
|
||||
# Unsupported target "objectmap" with type "example" omitted
|
||||
|
||||
# Unsupported target "readobj" with type "example" omitted
|
||||
|
||||
rust_library(
|
||||
name = "object",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
"archive",
|
||||
"coff",
|
||||
"elf",
|
||||
"macho",
|
||||
"pe",
|
||||
"read_core",
|
||||
"unaligned",
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2018",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.23.0",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
||||
# Unsupported target "integration" with type "test" omitted
|
||||
|
||||
# Unsupported target "parse_self" with type "test" omitted
|
|
@ -1,53 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # MIT from expression "MIT OR Apache-2.0"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
rust_library(
|
||||
name = "rustc_demangle",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2015",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.1.18",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
],
|
||||
)
|
|
@ -1,59 +0,0 @@
|
|||
"""
|
||||
@generated
|
||||
cargo-raze crate build file.
|
||||
|
||||
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||
"""
|
||||
|
||||
# buildifier: disable=load
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# buildifier: disable=load
|
||||
load(
|
||||
"@rules_rust//rust:rust.bzl",
|
||||
"rust_binary",
|
||||
"rust_library",
|
||||
"rust_test",
|
||||
)
|
||||
|
||||
package(default_visibility = [
|
||||
# Public for visibility by "@raze__crate__version//" targets.
|
||||
#
|
||||
# Prefer access through "//cargo", which limits external
|
||||
# visibility to explicit Cargo.toml dependencies.
|
||||
"//visibility:public",
|
||||
])
|
||||
|
||||
licenses([
|
||||
"notice", # MIT from expression "MIT"
|
||||
])
|
||||
|
||||
# Generated Targets
|
||||
|
||||
rust_library(
|
||||
name = "synstructure",
|
||||
srcs = glob(["**/*.rs"]),
|
||||
crate_features = [
|
||||
"default",
|
||||
"proc-macro",
|
||||
],
|
||||
crate_root = "src/lib.rs",
|
||||
crate_type = "lib",
|
||||
data = [],
|
||||
edition = "2018",
|
||||
rustc_flags = [
|
||||
"--cap-lints=allow",
|
||||
],
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
version = "0.12.4",
|
||||
# buildifier: leave-alone
|
||||
deps = [
|
||||
"@raze__proc_macro2__1_0_24//:proc_macro2",
|
||||
"@raze__quote__1_0_9//:quote",
|
||||
"@raze__syn__1_0_65//:syn",
|
||||
"@raze__unicode_xid__0_2_1//:unicode_xid",
|
||||
],
|
||||
)
|
|
@ -80,7 +80,6 @@ rust_library(
|
|||
"//rslib/cargo:bytes",
|
||||
"//rslib/cargo:chrono",
|
||||
"//rslib/cargo:coarsetime",
|
||||
"//rslib/cargo:failure",
|
||||
"//rslib/cargo:flate2",
|
||||
"//rslib/cargo:fluent",
|
||||
"//rslib/cargo:fnv",
|
||||
|
|
|
@ -38,7 +38,6 @@ blake3 = "0.3.5"
|
|||
bytes = "0.5.5"
|
||||
chrono = "0.4.13"
|
||||
coarsetime = "0.1.16"
|
||||
failure = "0.1.8"
|
||||
flate2 = "1.0.16"
|
||||
fluent = "0.15"
|
||||
fluent-bundle = "0.15"
|
||||
|
|
|
@ -93,15 +93,6 @@ alias(
|
|||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "failure",
|
||||
actual = "@raze__failure__0_1_8//:failure",
|
||||
tags = [
|
||||
"cargo-raze",
|
||||
"manual",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "flate2",
|
||||
actual = "@raze__flate2__1_0_20//:flate2",
|
||||
|
|
|
@ -12,72 +12,40 @@ pub use {
|
|||
};
|
||||
|
||||
use crate::i18n::I18n;
|
||||
pub use failure::{Error, Fail};
|
||||
use std::io;
|
||||
use std::{fmt::Display, io};
|
||||
use tempfile::PathPersistError;
|
||||
|
||||
pub type Result<T, E = AnkiError> = std::result::Result<T, E>;
|
||||
|
||||
#[derive(Debug, Fail, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum AnkiError {
|
||||
#[fail(display = "invalid input: {}", info)]
|
||||
InvalidInput { info: String },
|
||||
|
||||
#[fail(display = "invalid card template: {}", info)]
|
||||
TemplateError { info: String },
|
||||
|
||||
#[fail(display = "unable to save template {}", ordinal)]
|
||||
TemplateSaveError { ordinal: usize },
|
||||
|
||||
#[fail(display = "I/O error: {}", info)]
|
||||
IoError { info: String },
|
||||
|
||||
#[fail(display = "DB error: {}", info)]
|
||||
DbError { info: String, kind: DbErrorKind },
|
||||
|
||||
#[fail(display = "Network error: {:?}", _0)]
|
||||
NetworkError(NetworkError),
|
||||
|
||||
#[fail(display = "Sync error: {:?}", _0)]
|
||||
SyncError(SyncError),
|
||||
|
||||
#[fail(display = "JSON encode/decode error: {}", info)]
|
||||
JsonError { info: String },
|
||||
|
||||
#[fail(display = "Protobuf encode/decode error: {}", info)]
|
||||
ProtoError { info: String },
|
||||
|
||||
#[fail(display = "Unable to parse number")]
|
||||
ParseNumError,
|
||||
|
||||
#[fail(display = "The user interrupted the operation.")]
|
||||
Interrupted,
|
||||
|
||||
#[fail(display = "Operation requires an open collection.")]
|
||||
CollectionNotOpen,
|
||||
|
||||
#[fail(display = "Close the existing collection first.")]
|
||||
CollectionAlreadyOpen,
|
||||
|
||||
#[fail(display = "A requested item was not found.")]
|
||||
NotFound,
|
||||
|
||||
#[fail(display = "The provided item already exists.")]
|
||||
Existing,
|
||||
|
||||
#[fail(display = "Unable to place item in/under a filtered deck.")]
|
||||
DeckIsFiltered,
|
||||
|
||||
#[fail(display = "Invalid search.")]
|
||||
SearchError(SearchErrorKind),
|
||||
|
||||
#[fail(display = "Provided search(es) did not match any cards.")]
|
||||
FilteredDeckEmpty,
|
||||
|
||||
#[fail(display = "Invalid regex provided.")]
|
||||
InvalidRegex(String),
|
||||
}
|
||||
|
||||
impl Display for AnkiError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{:?}", self)
|
||||
}
|
||||
}
|
||||
|
||||
// error helpers
|
||||
impl AnkiError {
|
||||
pub(crate) fn invalid_input<S: Into<String>>(s: S) -> AnkiError {
|
||||
|
|
Loading…
Reference in New Issue