Suppressed or corrected hints and warnings

This commit is contained in:
Josh Mitchell
2020-11-07 20:05:37 +11:00
parent e30a175d0d
commit 0a613c2022
3 changed files with 5 additions and 3 deletions

View File

@@ -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;

View File

@@ -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()
}

View File

@@ -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,
}