From 0a613c2022de631dc74962c669dc3ab101b18fc9 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Sat, 7 Nov 2020 20:05:37 +1100 Subject: [PATCH] Suppressed or corrected hints and warnings --- src/c_abi/mod.rs | 3 ++- src/frame.rs | 2 +- src/lib.rs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/c_abi/mod.rs b/src/c_abi/mod.rs index 5e327be..5bbb9e9 100644 --- a/src/c_abi/mod.rs +++ b/src/c_abi/mod.rs @@ -1,5 +1,6 @@ +#![allow(non_upper_case_globals, non_camel_case_types)] + pub mod xdr_seek; -#[allow(non_upper_case_globals)] pub mod xdrfile; pub mod xdrfile_trr; pub mod xdrfile_xtc; diff --git a/src/frame.rs b/src/frame.rs index 819d1f0..805f8e7 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -53,7 +53,7 @@ impl Frame { /// Creates a frame with the given capacity pub fn with_capacity(num_atoms: u32) -> Frame { Frame { - num_atoms: num_atoms, + num_atoms, coords: vec![[0.0, 0.0, 0.0]; num_atoms as usize], ..Default::default() } diff --git a/src/lib.rs b/src/lib.rs index 071a04a..7202792 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,7 +32,7 @@ //! assert_eq!(first_atom_coords, [-0.8901, 0.4127, -0.055499997]); //! } //! Err(msg) => { -//! panic!("Something went wrong: {}", msg); +//! panic!("Something went wrong: {}", msg); //! } //! } //! ``` @@ -104,6 +104,7 @@ fn path_to_cstring(path: &Path) -> CString { /// A safe wrapper around the c implementation of an XDRFile struct XDRFile { xdrfile: *mut XDRFILE, + #[allow(dead_code)] filemode: FileMode, path: String, }