mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 00:46:30 +03:00
Remove dc_open call
A new context is now created by calling Context::new and therefore you always have a valid context. This is much more in Rust style and will allow a lot of furture simplifications on the context itself. The FFI layer has not yet been adjusted in this commit and thus will fail.
This commit is contained in:
committed by
Floris Bruynooghe
parent
e5699e8ba9
commit
afc9a31080
@@ -22,6 +22,8 @@ pub enum Error {
|
||||
Image(image_meta::ImageError),
|
||||
#[fail(display = "{:?}", _0)]
|
||||
Utf8(std::str::Utf8Error),
|
||||
#[fail(display = "{:?}", _0)]
|
||||
CStringError(crate::dc_tools::CStringError),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
@@ -62,6 +64,12 @@ impl From<image_meta::ImageError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<crate::dc_tools::CStringError> for Error {
|
||||
fn from(err: crate::dc_tools::CStringError) -> Error {
|
||||
Error::CStringError(err)
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bail {
|
||||
($e:expr) => {
|
||||
|
||||
Reference in New Issue
Block a user