Skip to content

Commit eeb9c98

Browse files
committed
Rename
1 parent 9aa5f8a commit eeb9c98

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

zjit/src/backend/lir.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,15 +1903,15 @@ impl Assembler
19031903

19041904
/// Return a result of fmt::Display for Assembler without escape sequence
19051905
pub fn lir_string(asm: &Assembler) -> String {
1906-
use crate::utils::TTY_TERMINAL_COLOR;
1906+
use crate::ttycolors::TTY_TERMINAL_COLOR;
19071907
format!("{asm}").replace(TTY_TERMINAL_COLOR.bold_begin, "").replace(TTY_TERMINAL_COLOR.bold_end, "")
19081908
}
19091909

19101910
impl fmt::Display for Assembler {
19111911
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19121912
// Count the number of duplicated label names to disambiguate them if needed
19131913
let mut label_counts: HashMap<&String, usize> = HashMap::new();
1914-
let colors = crate::utils::get_colors();
1914+
let colors = crate::ttycolors::get_colors();
19151915
let bold_begin = colors.bold_begin;
19161916
let bold_end = colors.bold_end;
19171917
for label_name in self.label_names.iter() {
@@ -2507,7 +2507,7 @@ impl AssemblerPanicHook {
25072507

25082508
/// Dump Assembler, highlighting the insn_idx line
25092509
fn dump_asm(asm: &Assembler, insn_idx: usize) {
2510-
let colors = crate::utils::get_colors();
2510+
let colors = crate::ttycolors::get_colors();
25112511
let bold_begin = colors.bold_begin;
25122512
let bold_end = colors.bold_end;
25132513
let lir_string = lir_string(asm);

zjit/src/disasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn disasm_addr_range(cb: &CodeBlock, start_addr: usize, end_addr: usize) ->
3333
let start_addr = 0;
3434
let insns = cs.disasm_all(code_slice, start_addr as u64).unwrap();
3535

36-
let colors = crate::utils::get_colors();
36+
let colors = crate::ttycolors::get_colors();
3737
let bold_begin = colors.bold_begin;
3838
let bold_end = colors.bold_end;
3939

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub static NON_TTY_TERMINAL_COLOR: TerminalColor = TerminalColor {
2323

2424
/// Terminal escape codes for colors, font weight, etc. Only enabled if stdout is a TTY.
2525
pub fn get_colors() -> &'static TerminalColor {
26-
if crate::utils::stdout_supports_colors() {
26+
if stdout_supports_colors() {
2727
&TTY_TERMINAL_COLOR
2828
} else {
2929
&NON_TTY_TERMINAL_COLOR

0 commit comments

Comments
 (0)