mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
cleanup: Use const instead of static
This commit is contained in:
parent
ee32615df1
commit
8b601812a6
@ -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
|
||||
|
@ -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)]
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user