Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
clippy 0.0.112 - Docs.rs
[go: Go Back, main page]

clippy 0.0.112

A bunch of helpful lints to avoid common pitfalls in Rust
#![feature(plugin)]
#![plugin(clippy)]

#[macro_use]
extern crate lazy_static;

use std::collections::HashMap;

#[deny(mut_mut)]
#[allow(unused_variables, unused_mut)]
fn main() {
    lazy_static! {
        static ref MUT_MAP : HashMap<usize, &'static str> = {
            let mut m = HashMap::new();
            let mut zero = &mut &mut "zero";
            m.insert(0, "zero");
            m
        };
        static ref MUT_COUNT : usize = MUT_MAP.len();
    }
    assert!(*MUT_COUNT == 1);
}