Skip to content

Commit ed240cb

Browse files
committed
Avoid ANSI codes in debug! messages
1 parent 64bcd4e commit ed240cb

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

crates/uv-installer/src/satisfies.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::borrow::Cow;
22
use std::fmt::Debug;
33

4-
use owo_colors::OwoColorize;
4+
55
use same_file::is_same_file;
66
use tracing::{debug, trace};
77
use url::Url;
@@ -376,18 +376,18 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
376376

377377
if let Some(current) = current_tag {
378378
let message = if let Some(pretty) = current.pretty() {
379-
format!("{} (`{}`)", pretty.cyan(), current.cyan())
379+
format!("{} (`{}`)", pretty, current)
380380
} else {
381-
format!("`{}`", current.cyan())
381+
format!("`{}`", current)
382382
};
383383

384384
Some(format!(
385385
"The distribution is compatible with {}, but you're using {}",
386386
wheel_tags
387387
.map(|tag| if let Some(pretty) = tag.pretty() {
388-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
388+
format!("{} (`{}`)", pretty, tag)
389389
} else {
390-
format!("`{}`", tag.cyan())
390+
format!("`{}`", tag)
391391
})
392392
.collect::<Vec<_>>()
393393
.join(", "),
@@ -398,9 +398,9 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
398398
"The distribution requires {}",
399399
wheel_tags
400400
.map(|tag| if let Some(pretty) = tag.pretty() {
401-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
401+
format!("{} (`{}`)", pretty, tag)
402402
} else {
403-
format!("`{}`", tag.cyan())
403+
format!("`{}`", tag)
404404
})
405405
.collect::<Vec<_>>()
406406
.join(", ")
@@ -413,17 +413,17 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
413413

414414
if let Some(current) = current_tag {
415415
let message = if let Some(pretty) = current.pretty() {
416-
format!("{} (`{}`)", pretty.cyan(), current.cyan())
416+
format!("{} (`{}`)", pretty, current)
417417
} else {
418-
format!("`{}`", current.cyan())
418+
format!("`{}`", current)
419419
};
420420
Some(format!(
421421
"The distribution is compatible with {}, but you're using {}",
422422
wheel_tags
423423
.map(|tag| if let Some(pretty) = tag.pretty() {
424-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
424+
format!("{} (`{}`)", pretty, tag)
425425
} else {
426-
format!("`{}`", tag.cyan())
426+
format!("`{}`", tag)
427427
})
428428
.collect::<Vec<_>>()
429429
.join(", "),
@@ -434,9 +434,9 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
434434
"The distribution requires {}",
435435
wheel_tags
436436
.map(|tag| if let Some(pretty) = tag.pretty() {
437-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
437+
format!("{} (`{}`)", pretty, tag)
438438
} else {
439-
format!("`{}`", tag.cyan())
439+
format!("`{}`", tag)
440440
})
441441
.collect::<Vec<_>>()
442442
.join(", ")
@@ -449,17 +449,17 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
449449

450450
if let Some(current) = current_tag {
451451
let message = if let Some(pretty) = current.pretty() {
452-
format!("{} (`{}`)", pretty.cyan(), current.cyan())
452+
format!("{} (`{}`)", pretty, current)
453453
} else {
454-
format!("`{}`", current.cyan())
454+
format!("`{}`", current)
455455
};
456456
Some(format!(
457457
"The distribution is compatible with {}, but you're on {}",
458458
wheel_tags
459459
.map(|tag| if let Some(pretty) = tag.pretty() {
460-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
460+
format!("{} (`{}`)", pretty, tag)
461461
} else {
462-
format!("`{}`", tag.cyan())
462+
format!("`{}`", tag)
463463
})
464464
.collect::<Vec<_>>()
465465
.join(", "),
@@ -470,9 +470,9 @@ fn generate_dist_compatibility_hint(wheel_tags: &ExpandedTags, tags: &Tags) -> O
470470
"The distribution requires {}",
471471
wheel_tags
472472
.map(|tag| if let Some(pretty) = tag.pretty() {
473-
format!("{} (`{}`)", pretty.cyan(), tag.cyan())
473+
format!("{} (`{}`)", pretty, tag)
474474
} else {
475-
format!("`{}`", tag.cyan())
475+
format!("`{}`", tag)
476476
})
477477
.collect::<Vec<_>>()
478478
.join(", ")

0 commit comments

Comments
 (0)