mirror of
git://git.proxmox.com/git/perlmod.git
synced 2025-03-13 04:58:16 +03:00
switch from failure to anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
40e6b9d999
commit
fb6b493d63
@ -14,7 +14,7 @@ maintenance = { status = "experimental" }
|
||||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
failure = "0.1"
|
||||
anyhow = "1.0"
|
||||
proc-macro2 = "1.0"
|
||||
quote = "1.0"
|
||||
syn = { version = "1.0", features = [ "full" ] }
|
||||
|
@ -1,4 +1,4 @@
|
||||
use failure::Error;
|
||||
use anyhow::Error;
|
||||
|
||||
use proc_macro2::{Ident, TokenStream, Span};
|
||||
|
||||
|
@ -7,7 +7,7 @@ extern crate proc_macro2;
|
||||
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use failure::Error;
|
||||
use anyhow::Error;
|
||||
|
||||
use proc_macro::TokenStream as TokenStream_1;
|
||||
use proc_macro2::TokenStream;
|
||||
@ -53,7 +53,7 @@ fn handle_error(mut item: TokenStream, data: Result<TokenStream, Error>) -> Toke
|
||||
/// // file.
|
||||
/// #[perlmod::package(name = "RSPM::Foo", lib = "perlmod_test", file = "/dev/null")]
|
||||
/// mod an_unused_name {
|
||||
/// use failure::{bail, Error};
|
||||
/// use anyhow::{bail, Error};
|
||||
///
|
||||
/// // This function can be used like `RSPM::Foo::foo(1, 2);` in perl.
|
||||
/// #[export]
|
||||
@ -95,7 +95,7 @@ pub fn export(attr: TokenStream_1, item: TokenStream_1) -> TokenStream_1 {
|
||||
///
|
||||
/// ```
|
||||
/// # mod testmod {
|
||||
/// use failure::{bail, Error};
|
||||
/// use anyhow::{bail, Error};
|
||||
/// use perlmod::export;
|
||||
///
|
||||
/// #[export]
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::convert::TryFrom;
|
||||
use std::iter::IntoIterator;
|
||||
|
||||
use failure::Error;
|
||||
use anyhow::Error;
|
||||
|
||||
use proc_macro2::TokenStream;
|
||||
|
||||
|
@ -4,7 +4,7 @@ use std::env;
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use failure::Error;
|
||||
use anyhow::Error;
|
||||
|
||||
use proc_macro2::{Ident, Span};
|
||||
|
||||
|
@ -8,5 +8,5 @@ edition = "2018"
|
||||
crate-type = [ "cdylib" ]
|
||||
|
||||
[dependencies]
|
||||
failure = "0.1"
|
||||
anyhow = "1.0"
|
||||
perlmod = { path = "../perlmod", features = [ "exporter" ] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
#[perlmod::package(name = "RSPM::Foo", lib = "perlmod_test")]
|
||||
mod export {
|
||||
use failure::{bail, Error};
|
||||
use anyhow::{bail, Error};
|
||||
|
||||
#[export]
|
||||
fn foo(a: u32, b: u32) -> Result<u32, Error> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#![perlmod::package(name = "RSPM::Foo", lib = "perlmod_test")]
|
||||
|
||||
use failure::{bail, Error};
|
||||
use anyhow::{bail, Error};
|
||||
|
||||
#[export]
|
||||
fn foo(a: u32, b: u32) -> Result<u32, Error> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use failure::{bail, Error};
|
||||
use anyhow::{bail, Error};
|
||||
|
||||
#[perlmod::export]
|
||||
fn foo(a: u32, b: u32) -> Result<u32, Error> {
|
||||
|
@ -12,8 +12,8 @@ keywords = [ "ffi", "perl" ]
|
||||
maintenance = { status = "experimental" }
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
bitflags = "1.2.1"
|
||||
failure = "0.1"
|
||||
libc = "0.2"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
perlmod-macro = { path = "../perlmod-macro", optional = true }
|
||||
|
@ -187,7 +187,7 @@ pub fn stack_push(value: crate::Mortal) {
|
||||
/// # struct Output;
|
||||
///
|
||||
/// # fn code_to_extract_parameters() {}
|
||||
/// # fn actual_rust_function(_arg: ()) -> Result<Output, failure::Error> { Ok(Output) }
|
||||
/// # fn actual_rust_function(_arg: ()) -> Result<Output, anyhow::Error> { Ok(Output) }
|
||||
/// #[no_mangle]
|
||||
/// pub extern "C" fn exported_name(cv: &::perlmod::ffi::CV) {
|
||||
/// unsafe {
|
||||
|
Loading…
x
Reference in New Issue
Block a user