cleanup: Use const instead of static

This commit is contained in:
Kamal Marhubi 2016-02-01 23:40:45 -05:00
parent ee32615df1
commit 8b601812a6
3 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,8 @@
use std::fmt;
pub use config::ReportTactic;
static TO_DO_CHARS: &'static [char] = &['T', 'O', 'D', 'O'];
static FIX_ME_CHARS: &'static [char] = &['F', 'I', 'X', 'M', 'E'];
const TO_DO_CHARS: &'static [char] = &['T', 'O', 'D', 'O'];
const FIX_ME_CHARS: &'static [char] = &['F', 'I', 'X', 'M', 'E'];
// Enabled implementation detail is here because it is
// irrelevant outside the issues module

View File

@ -30,7 +30,7 @@ use expr::{rewrite_call, rewrite_array};
use comment::FindUncommented;
use utils::{wrap_str, span_after};
static FORCED_BRACKET_MACROS: &'static [&'static str] = &["vec!"];
const FORCED_BRACKET_MACROS: &'static [&'static str] = &["vec!"];
// FIXME: use the enum from libsyntax?
#[derive(Clone, Copy, PartialEq, Eq)]

View File

@ -23,7 +23,7 @@ use rustfmt::filemap::{write_system_newlines, FileMap};
use rustfmt::config::{Config, ReportTactic, WriteMode};
use rustfmt::rustfmt_diff::*;
static DIFF_CONTEXT_SIZE: usize = 3;
const DIFF_CONTEXT_SIZE: usize = 3;
fn get_path_string(dir_entry: io::Result<fs::DirEntry>) -> String {
let path = dir_entry.expect("Couldn't get DirEntry").path();