summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/src/common.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-07-09 12:51:10 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-07-15 12:47:53 +0200
commit775f0c039349335df880d35db7df6c131419f0eb (patch)
tree2d16928f3a629b7afae95cf1b9d518c5603a9f93 /openpgp-ffi/src/common.rs
parentcaec575e3c44e6045e29aa452ad31f91d04ec139 (diff)
Prepare for Rust 2018.
- This is the result of running `cargo fix --edition`, with some manual adjustments. - The vast majority of changes merely qualify module paths with 'crate::'. - Two instances of adding an anonymous pattern to a trait's function. - `async` is a keyword in Rust 2018, and hence it needs to be escaped (e.g. in the case of the net::r#async module). - The manual adjustments were needed due to various shortcomings of the analysis employed by `cargo fix`, e.g. unexpanded macros, procedural macros, lalrpop grammars.
Diffstat (limited to 'openpgp-ffi/src/common.rs')
-rw-r--r--openpgp-ffi/src/common.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp-ffi/src/common.rs b/openpgp-ffi/src/common.rs
index 32c42156..2e8afb99 100644
--- a/openpgp-ffi/src/common.rs
+++ b/openpgp-ffi/src/common.rs
@@ -112,7 +112,7 @@ macro_rules! ffi_return_string {
($name:expr) => {{
let string = $name;
let bytes: &[u8] = string.as_ref();
- ::strndup(bytes).expect(
+ crate::strndup(bytes).expect(
&format!("Returned string {} contains a 0 byte.", stringify!($name))
)
}};
@@ -128,7 +128,7 @@ macro_rules! ffi_return_maybe_string {
($name:expr) => {{
let string = $name;
let bytes: &[u8] = string.as_ref();
- ::strndup(bytes).unwrap_or(::std::ptr::null_mut())
+ crate::strndup(bytes).unwrap_or(::std::ptr::null_mut())
}};
}
@@ -147,11 +147,11 @@ macro_rules! ffi_make_fry_from_errp {
macro_rules! ffi_try_status {
($expr:expr) => {
match $expr {
- Ok(_) => ::error::Status::Success,
+ Ok(_) => crate::error::Status::Success,
Err(e) => {
- use MoveIntoRaw;
+ use crate::MoveIntoRaw;
use failure::Error;
- let status = ::error::Status::from(&e);
+ let status = crate::error::Status::from(&e);
if let Some(errp) = $errp {
let e : Error = e.into();
*errp = e.move_into_raw();
@@ -172,7 +172,7 @@ macro_rules! ffi_make_fry_from_errp {
match $expr {
Ok(v) => v,
Err(e) => {
- use MoveIntoRaw;
+ use crate::MoveIntoRaw;
use failure::Error;
if let Some(errp) = $errp {
let e : Error = e.into();