summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-11-11 16:07:29 +0000
committerLars Wirzenius <liw@liw.fi>2023-11-11 16:07:29 +0000
commitef9d59ae8b2529d71c3d4a732751c5b1cbec322a (patch)
treeb660da93936d092a62dd95389a0a109878264106
parent16521f5e92c06c978c148aa69bd5223eb126aea5 (diff)
parent726bc2d6d8b13b3e914c82f1aaf0c0c53d38aead (diff)
downloadsubplot-ef9d59ae8b2529d71c3d4a732751c5b1cbec322a.tar.gz
Merge branch 'fix-340' into 'main'
chore: Update from fehler to culpa Closes #340 See merge request subplot/subplot!363
-rw-r--r--Cargo.lock71
-rw-r--r--examples/seq/Cargo.toml4
-rw-r--r--subplotlib-derive/Cargo.toml2
-rw-r--r--subplotlib-derive/src/lib.rs2
-rw-r--r--subplotlib/Cargo.toml2
-rw-r--r--subplotlib/src/prelude.rs12
-rw-r--r--subplotlib/src/types.rs2
7 files changed, 43 insertions, 52 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 322826e..7cf0c2c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -172,7 +172,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
]
[[package]]
@@ -207,6 +207,26 @@ dependencies = [
]
[[package]]
+name = "culpa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "342f946511fd882547ebd499adbf03b622c7dbf142820c6979ecc4e42bf470de"
+dependencies = [
+ "culpa-macros",
+]
+
+[[package]]
+name = "culpa-macros"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e61b829854bb3199d0dc9bcb5ce466425530f3705d7773583bdd4170e6ea46a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "cvt"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -285,26 +305,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
[[package]]
-name = "fehler"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5729fe49ba028cd550747b6e62cd3d841beccab5390aa398538c31a2d983635"
-dependencies = [
- "fehler-macros",
-]
-
-[[package]]
-name = "fehler-macros"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
name = "file_diff"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -413,7 +413,7 @@ dependencies = [
"log",
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
"time",
]
@@ -700,7 +700,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
]
[[package]]
@@ -960,7 +960,7 @@ checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
]
[[package]]
@@ -1110,7 +1110,7 @@ dependencies = [
name = "subplot-seq-example"
version = "0.1.0"
dependencies = [
- "fehler",
+ "culpa",
"subplot-build",
"subplotlib",
]
@@ -1120,7 +1120,7 @@ name = "subplotlib"
version = "0.9.0"
dependencies = [
"base64",
- "fehler",
+ "culpa",
"filetime",
"fs2",
"glob",
@@ -1141,21 +1141,10 @@ dependencies = [
name = "subplotlib-derive"
version = "0.9.0"
dependencies = [
- "fehler",
+ "culpa",
"proc-macro2",
"quote",
- "syn 2.0.38",
-]
-
-[[package]]
-name = "syn"
-version = "1.0.109"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
+ "syn",
]
[[package]]
@@ -1250,7 +1239,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
]
[[package]]
@@ -1311,7 +1300,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.38",
+ "syn",
]
[[package]]
diff --git a/examples/seq/Cargo.toml b/examples/seq/Cargo.toml
index 2d4696a..9915f94 100644
--- a/examples/seq/Cargo.toml
+++ b/examples/seq/Cargo.toml
@@ -8,7 +8,9 @@ license = "MIT-0"
[dev-dependencies]
subplotlib = { path = "../../subplotlib" }
-fehler = "1"
[build-dependencies]
subplot-build = { path = "../../subplot-build" }
+
+[dependencies]
+culpa = "1.0.1"
diff --git a/subplotlib-derive/Cargo.toml b/subplotlib-derive/Cargo.toml
index cb181d6..7d5b0c4 100644
--- a/subplotlib-derive/Cargo.toml
+++ b/subplotlib-derive/Cargo.toml
@@ -21,4 +21,4 @@ proc-macro = true
syn = { version = "2", features = ["full"] }
quote = "1"
proc-macro2 = "1"
-fehler = "1"
+culpa = "1.0.1"
diff --git a/subplotlib-derive/src/lib.rs b/subplotlib-derive/src/lib.rs
index b10d3b3..8e18c98 100644
--- a/subplotlib-derive/src/lib.rs
+++ b/subplotlib-derive/src/lib.rs
@@ -8,7 +8,7 @@ use syn::{
use quote::quote;
-use fehler::{throw, throws};
+use culpa::{throw, throws};
fn ty_is_borrow_str(ty: &Type) -> bool {
if let Type::Reference(ty) = ty {
diff --git a/subplotlib/Cargo.toml b/subplotlib/Cargo.toml
index d790915..bb328c6 100644
--- a/subplotlib/Cargo.toml
+++ b/subplotlib/Cargo.toml
@@ -16,7 +16,6 @@ rust-version = "1.70"
[dependencies]
-fehler = "1"
subplotlib-derive = { version = "0.9.0", path = "../subplotlib-derive" }
lazy_static = "1"
base64 = "0.21.0"
@@ -29,6 +28,7 @@ regex = "1.4"
shell-words = "1.0"
unescape = "0.1"
remove_dir_all = "0.8"
+culpa = "1.0.1"
[build-dependencies]
diff --git a/subplotlib/src/prelude.rs b/subplotlib/src/prelude.rs
index e0ac627..9397fa7 100644
--- a/subplotlib/src/prelude.rs
+++ b/subplotlib/src/prelude.rs
@@ -16,16 +16,16 @@
//! The primary thing you will need to learn, as a step function author, is
//! the [`#[step]`][macro@step] attribute macro, and it interacts with contexts.
-// Re-export fehler's macros so that step functions can use them
-pub use fehler::throw;
+// Re-export culpa's macros so that step functions can use them
+pub use culpa::throw;
/// Indicate what type a function throws
///
-/// This attribute macro comes from the [`fehler`] crate and is used
+/// This attribute macro comes from the [`culpa`] crate and is used
/// to indicate that a function "throws" a particular kind of error.
///
/// ```rust
/// # use std::io;
-/// # use fehler::throws;
+/// # use culpa::throws;
/// #[throws(io::Error)]
/// fn create_thingy() {
/// // something which might cause an io::Error
@@ -51,10 +51,10 @@ pub use fehler::throw;
///
// When https://github.com/rust-lang/rust/issues/83976 is resolved, the below
// can be added to this doc string.
-// You can see more documentation on this in the [fehler crate docs][fehler::throws].
+// You can see more documentation on this in the [culpa crate docs][culpa::throws].
// Alternatively we can get rid of this entirely if and when
// https://github.com/rust-lang/rust/issues/81893 is fixed.
-pub use fehler::throws;
+pub use culpa::throws;
// Re-export the lazy_static macro
#[doc(hidden)]
diff --git a/subplotlib/src/types.rs b/subplotlib/src/types.rs
index 963ce87..d2377ca 100644
--- a/subplotlib/src/types.rs
+++ b/subplotlib/src/types.rs
@@ -11,7 +11,7 @@ pub type StepError = ::std::boxed::Box<dyn ::std::error::Error>;
/// Result type using [`StepError`].
///
/// This is useful for use in situations where you
-/// might use [`#[throws(...)]`][macro@fehler::throws]. Step functions
+/// might use [`#[throws(...)]`][macro@culpa::throws]. Step functions
/// generated using the [`step`][macro@subplotlib_derive::step] macro will
/// automatically set this as their return type by means of `#[throws(StepResult)]`.
pub type StepResult = ::std::result::Result<(), StepError>;