rust: cargo fix for Rust 2018 edition

pull/4501/head
Jason Ish 6 years ago
parent 56528a38dd
commit e68dfa46a6

@ -16,7 +16,7 @@
*/
use std;
use core::{STREAM_TOSERVER};
use crate::core::{STREAM_TOSERVER};
#[repr(C)]
pub struct AppLayerGetTxIterTuple {

@ -17,9 +17,9 @@
use std::os::raw::c_int;
use lua::*;
use dns::dns::*;
use dns::log::*;
use crate::lua::*;
use crate::dns::dns::*;
use crate::dns::log::*;
#[no_mangle]
pub extern "C" fn rs_dns_lua_get_tx_id(clua: &mut CLuaState,

@ -18,9 +18,9 @@
// Author: Zach Kelly <zach.kelly@lmco.com>
use super::rdp::{RdpTransaction, RdpTransactionItem};
use json::{Json, JsonT};
use rdp::parser::*;
use rdp::windows;
use crate::json::{Json, JsonT};
use crate::rdp::parser::*;
use crate::rdp::windows;
use std;
use x509_parser::parse_x509_der;
@ -78,7 +78,7 @@ fn to_json(tx: &RdpTransaction) -> Option<Json> {
/// json helper for X224ConnectionRequest
fn x224_req_to_json(js: &Json, x224: &X224ConnectionRequest) {
use rdp::parser::NegotiationRequestFlags as Flags;
use crate::rdp::parser::NegotiationRequestFlags as Flags;
js.set_string("event_type", "initial_request");
if let Some(ref cookie) = x224.cookie {
@ -108,7 +108,7 @@ fn x224_req_to_json(js: &Json, x224: &X224ConnectionRequest) {
/// json helper for X224ConnectionConfirm
fn x224_conf_to_json(js: &Json, x224: &X224ConnectionConfirm) {
use rdp::parser::NegotiationResponseFlags as Flags;
use crate::rdp::parser::NegotiationResponseFlags as Flags;
js.set_string("event_type", "initial_response");
if let Some(ref from_server) = x224.negotiation_from_server {
@ -292,7 +292,7 @@ fn mcs_req_to_json(js: &Json, mcs: &McsConnectRequest) {
if let Some(ref early_capability_flags) =
client.early_capability_flags
{
use rdp::parser::EarlyCapabilityFlags as Flags;
use crate::rdp::parser::EarlyCapabilityFlags as Flags;
if !early_capability_flags.is_empty() {
let flags = Json::array();

@ -27,11 +27,11 @@
//! * x.691-spec: <https://www.itu.int/rec/T-REC-X.691/en>
use nom::{be_u16, be_u8, le_u16, le_u32, le_u8, ErrorKind, IResult};
use rdp::error::RDP_NOT_X224_CLASS_0_ERROR;
use rdp::util::{
use crate::rdp::error::RDP_NOT_X224_CLASS_0_ERROR;
use crate::rdp::util::{
le_slice_to_string, parse_per_length_determinant, utf7_slice_to_string,
};
use rdp::windows;
use crate::rdp::windows;
/// constrains dimension to a range, per spec
/// rdp-spec, section 2.2.1.3.2 Client Core Data
@ -1111,7 +1111,7 @@ fn parse_mcs_connect_response(
#[cfg(test)]
mod tests_cookie_21182 {
use rdp::parser::*;
use crate::rdp::parser::*;
static BYTES: [u8; 37] = [
0x03, 0x00, 0x00, 0x25, 0x20, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43,
@ -1145,7 +1145,7 @@ mod tests_cookie_21182 {
#[cfg(test)]
mod tests_negotiate_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
static BYTES: [u8; 20] = [
0x03, 0x00, 0x00, 0x13, 0x0e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
@ -1188,7 +1188,7 @@ mod tests_negotiate_49350 {
#[cfg(test)]
mod tests_core_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
static BYTES: [u8; 429] = [
0x03, 0x00, 0x01, 0xac, 0x02, 0xf0, 0x80, 0x7f, 0x65, 0x82, 0x01, 0xa0,
@ -1310,7 +1310,7 @@ mod tests_core_49350 {
#[cfg(test)]
mod tests_x223_response_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
// changed offset 9 from 0x65 to 0x66 so it is no longer an mcs connect
static BYTES: [u8; 9] =
@ -1337,7 +1337,7 @@ mod tests_x223_response_49350 {
#[cfg(test)]
mod tests_t123_raw_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
// changed offset 4 from 0x02 to 0x03 so it is no longer an X223 data object
static BYTES: [u8; 9] =
@ -1360,7 +1360,7 @@ mod tests_t123_raw_49350 {
#[cfg(test)]
mod tests_x224_raw_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
// changed offset 11 from 0x01 to 0x02 so it is not a known X224 payload type
static BYTES: [u8; 19] = [
@ -1396,7 +1396,7 @@ mod tests_x224_raw_49350 {
#[cfg(test)]
mod tests_x223_raw_49350 {
use rdp::parser::*;
use crate::rdp::parser::*;
// changed offset 9 from 0x65 to 0xff so it is no longer an mcs connect
static BYTES: [u8; 9] =
@ -1422,7 +1422,7 @@ mod tests_x223_raw_49350 {
#[cfg(test)]
mod tests_negotiate_incomplete_49350 {
use nom;
use rdp::parser::*;
use crate::rdp::parser::*;
static BYTES: [u8; 19] = [
0x03, 0x00, 0x00, 0x13, 0x0e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
@ -1476,7 +1476,7 @@ mod tests_negotiate_incomplete_49350 {
#[cfg(test)]
mod tests_core_incomplete_49350 {
use nom;
use rdp::parser::*;
use crate::rdp::parser::*;
static BYTES: [u8; 428] = [
0x03, 0x00, 0x01, 0xac, 0x02, 0xf0, 0x80, 0x7f, 0x65, 0x82, 0x01, 0xa0,

@ -19,13 +19,13 @@
//! RDP application layer
use core::{
use crate::core::{
self, AppProto, DetectEngineState, Flow, ALPROTO_UNKNOWN, IPPROTO_TCP,
};
use conf;
use crate::conf;
use nom;
use parser::*;
use rdp::parser::*;
use crate::parser::*;
use crate::rdp::parser::*;
use std;
use std::mem::transmute;
use tls_parser::{
@ -561,7 +561,7 @@ pub unsafe extern "C" fn rs_rdp_register_parser() {
#[cfg(test)]
mod tests {
use super::*;
use rdp::parser::{RdpCookie, X224ConnectionRequest};
use crate::rdp::parser::{RdpCookie, X224ConnectionRequest};
#[test]
fn test_probe_rdp() {

@ -21,7 +21,7 @@ use byteorder::ReadBytesExt;
use memchr::memchr;
use nom;
use nom::{ErrorKind, IResult, Needed};
use rdp::error::RDP_UNIMPLEMENTED_LENGTH_DETERMINANT;
use crate::rdp::error::RDP_UNIMPLEMENTED_LENGTH_DETERMINANT;
use std::io::Cursor;
use widestring::U16CString;
@ -105,7 +105,7 @@ pub fn parse_per_length_determinant(input: &[u8]) -> IResult<&[u8], u32> {
mod tests {
use super::*;
use nom;
use rdp::error::RDP_UNIMPLEMENTED_LENGTH_DETERMINANT;
use crate::rdp::error::RDP_UNIMPLEMENTED_LENGTH_DETERMINANT;
#[test]
fn test_le_string_abc() {

@ -17,8 +17,8 @@
// written by Giuseppe Longo <giuseppe@glongo.it>
use core::{STREAM_TOCLIENT, STREAM_TOSERVER};
use sip::sip::SIPTransaction;
use crate::core::{STREAM_TOCLIENT, STREAM_TOSERVER};
use crate::sip::sip::SIPTransaction;
use std::ptr;
#[no_mangle]

@ -17,8 +17,8 @@
// written by Giuseppe Longo <giuseppe@glongo.it>
use json::*;
use sip::sip::{SIPState, SIPTransaction};
use crate::json::*;
use crate::sip::sip::{SIPState, SIPTransaction};
#[no_mangle]
pub extern "C" fn rs_sip_log_json(_state: &mut SIPState, tx: &mut SIPTransaction) -> *mut JsonT {

@ -19,13 +19,13 @@
extern crate nom;
use applayer;
use conf;
use core;
use core::{sc_detect_engine_state_free, AppProto, Flow, ALPROTO_UNKNOWN};
use log::*;
use parser::*;
use sip::parser::*;
use crate::applayer;
use crate::conf;
use crate::core;
use crate::core::{sc_detect_engine_state_free, AppProto, Flow, ALPROTO_UNKNOWN};
use crate::log::*;
use crate::parser::*;
use crate::sip::parser::*;
use std;
use std::ffi::{CStr, CString};

@ -18,7 +18,7 @@
use crate::smb::smb::*;
#[cfg(feature = "debug")]
use log::*;
use crate::log::*;
impl SMBState {
#[cfg(not(feature = "debug"))]

Loading…
Cancel
Save