From c982a63cd97a99195d259785061d8ccad6161e36 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Wed, 2 Oct 2019 23:27:59 -0400 Subject: [PATCH] More minor cleanup --- {examples => aeron_driver-sys/examples}/aeronmd.rs | 0 src/client/cnc_descriptor.rs | 9 ++++++--- 2 files changed, 6 insertions(+), 3 deletions(-) rename {examples => aeron_driver-sys/examples}/aeronmd.rs (100%) diff --git a/examples/aeronmd.rs b/aeron_driver-sys/examples/aeronmd.rs similarity index 100% rename from examples/aeronmd.rs rename to aeron_driver-sys/examples/aeronmd.rs diff --git a/src/client/cnc_descriptor.rs b/src/client/cnc_descriptor.rs index 6385354..ae0d2ed 100644 --- a/src/client/cnc_descriptor.rs +++ b/src/client/cnc_descriptor.rs @@ -60,12 +60,15 @@ pub struct MetaDataDefinition { _pid: i64, } -/// Version code for the Aeron CnC file format +/// Version code for the Aeron CnC file format that this client is compatible with pub const CNC_VERSION: i32 = crate::sematic_version_compose(0, 0, 16); +/// Filename for the CnC file located in the Aeron directory +pub const CNC_FILE: &str = "cnc.dat"; + #[cfg(test)] mod tests { - use crate::client::cnc_descriptor::{MetaDataDefinition, CNC_VERSION}; + use crate::client::cnc_descriptor::{MetaDataDefinition, CNC_FILE, CNC_VERSION}; use crate::driver::{DriverContext, MediaDriver}; use memmap::MmapOptions; use std::fs::File; @@ -81,7 +84,7 @@ mod tests { let _driver = MediaDriver::with_context(context).unwrap(); // Open the CnC location - let cnc_path = dir_path.join("cnc.dat"); + let cnc_path = dir_path.join(CNC_FILE); let cnc_file = File::open(&cnc_path).expect("Unable to open CnC file"); let mmap = unsafe { MmapOptions::default()