Skip to content

Commit

Permalink
Fix a couple of compiler warnings.
Browse files Browse the repository at this point in the history
 * Removed several unused variables.
 * Truncated some usize parameters so that they also fit on in a u32 for x86 builds.
  • Loading branch information
Michael McGee committed Sep 29, 2016
1 parent dbe0501 commit 715b12c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/basic_usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn main() {
hkcu.delete_subkey_all(&path).unwrap();

println!("Trying to open nonexistent key...");
let key2 = hkcu.open_subkey(&path)
hkcu.open_subkey(&path)
.unwrap_or_else(|e| match e.kind() {
io::ErrorKind::NotFound => panic!("Key doesn't exist"),
io::ErrorKind::PermissionDenied => panic!("Access denied"),
Expand Down
2 changes: 1 addition & 1 deletion examples/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn main() {
t_u16: 32768,
t_u32: 123456789,
t_u64: 123456789101112,
t_usize: 123456789101112,
t_usize: 1234567891,
t_struct: Rectangle{
coords: Coords{ x: 55, y: 77 },
size: Size{ w: 500, h: 300 },
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,8 @@ mod test {
use super::enums::*;
use super::types::*;
use std::collections::HashMap;
use rustc_serialize::{Encodable,Decodable};
use self::rand::Rng;
use std::ffi::{OsStr,OsString};
//use std::os::windows::ffi::{OsStrExt,OsStringExt};

#[test]
fn test_open_subkey_with_flags_query_info() {
Expand Down Expand Up @@ -1183,7 +1181,7 @@ mod test {
t_u16: 32768,
t_u32: 123456789,
t_u64: 123456789101112,
t_usize: 123456789101112,
t_usize: 1234567891,
t_struct: Rectangle{ x: 55, y: 77, w: 500, h: 300 },
t_string: "Test123 \n$%^&|+-*/\\()".to_owned(),
t_i8: -123,
Expand Down

0 comments on commit 715b12c

Please sign in to comment.