Skip to content

Commit fc6ced5

Browse files
committed
Update syntax for 2018 edition
1 parent 73cf572 commit fc6ced5

File tree

12 files changed

+83
-83
lines changed

12 files changed

+83
-83
lines changed

core/src/configuration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//use errors::*;
2-
use types::Level;
2+
use crate::types::Level;
33

44
#[derive(Debug, Serialize, Deserialize)]
55
#[serde(default)]

core/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use types::Notifier;
1+
use crate::types::Notifier;
22

33
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
44

core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub mod types;
2020
pub use log::Level;
2121
mod transport;
2222

23-
pub use configuration::Configuration;
24-
pub use transport::{HttpTransport, Transport};
23+
pub use crate::configuration::Configuration;
24+
pub use crate::transport::{HttpTransport, Transport};
2525

2626
pub struct Uuid(uuid::Uuid);
2727

core/src/transport.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use std::sync::{Arc, Condvar, Mutex};
44
use std::thread::{self, JoinHandle};
55
use std::time::Duration;
66

7-
use configuration::Configuration;
7+
use crate::configuration::Configuration;
88
use reqwest::Client;
9-
use types::Item;
9+
use crate::types::Item;
1010

1111
const QUEUE_DEPTH: usize = 50;
1212

jvm_core/src/env.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::mem::size_of;
22
use std::os::raw::{c_uchar, c_void};
33
use std::ptr;
44

5-
use errors::*;
5+
use crate::errors::*;
66

77
macro_rules! jvmtifn (
88
($r:expr, $f:ident, $($arg:tt)*) => { {
@@ -14,14 +14,14 @@ macro_rules! jvmtifn (
1414
}
1515
if rc != jvmtiError_JVMTI_ERROR_NONE {
1616
let message = format!("JVMTI {} failed", stringify!($f));
17-
bail!(::errors::ErrorKind::JvmTi(message, rc as i32))
17+
bail!(crate::errors::ErrorKind::JvmTi(message, rc as i32))
1818
} else {
1919
Ok(())
2020
}
2121
} }
2222
);
2323

24-
use jvmti::{
24+
use crate::jvmti::{
2525
jclass, jdouble, jfloat, jint, jlocation, jlong, jmethodID, jobject, jthread,
2626
jvmtiCapabilities, jvmtiEnv, jvmtiError_JVMTI_ERROR_NONE, jvmtiEventCallbacks,
2727
jvmtiEventMode_JVMTI_ENABLE, jvmtiEvent_JVMTI_EVENT_EXCEPTION, jvmtiFrameInfo,

jvm_core/src/errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error_chain! {
55
display("JNI call failed: '{}'", s)
66
}
77

8-
JvmTi(s: String, rc: ::jvmti::jint) {
8+
JvmTi(s: String, rc: crate::jvmti::jint) {
99
description("JVMTI call failure")
1010
display("{}: {:?}", s, rc)
1111
}
@@ -25,8 +25,8 @@ impl From<NulError> for Error {
2525
}
2626
}
2727

28-
impl From<Error> for ::jvmti::jint {
29-
fn from(err: Error) -> ::jvmti::jint {
28+
impl From<Error> for crate::jvmti::jint {
29+
fn from(err: Error) -> crate::jvmti::jint {
3030
match err {
3131
Error(ErrorKind::JvmTi(_, rc), _) => rc,
3232
Error(ErrorKind::Internal(_), _) => 113, // JVMTI_ERROR_INTERNAL

jvm_core/src/exceptions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use env::JvmTiEnv;
2-
use errors::*;
3-
use jni::JniEnv;
1+
use crate::env::JvmTiEnv;
2+
use crate::errors::*;
3+
use crate::jni::JniEnv;
44
use std::ffi::CStr;
55
use std::ptr;
66
use std::slice;
77

8-
use jvmti::{
8+
use crate::jvmti::{
99
jclass, jdouble, jfloat, jint, jlocation, jlong, jmethodID, jobject, jobjectArray, jsize,
1010
jthread, jvmtiError_JVMTI_ERROR_ABSENT_INFORMATION, jvmtiError_JVMTI_ERROR_NATIVE_METHOD,
1111
jvmtiFrameInfo, jvmtiLocalVariableEntry,

0 commit comments

Comments
 (0)