mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-28 06:49:19 +00:00
fmt passed
This commit is contained in:
parent
d787bb7d0f
commit
61fc2e7b66
@ -254,7 +254,9 @@ pub fn terminal_file_link<'a>(
|
|||||||
.queue(SetForegroundColor(color))?
|
.queue(SetForegroundColor(color))?
|
||||||
.queue(SetAttribute(Attribute::Underlined))?;
|
.queue(SetAttribute(Attribute::Underlined))?;
|
||||||
writer.stdout().write_all(b"\x1b]8;;file://")?;
|
writer.stdout().write_all(b"\x1b]8;;file://")?;
|
||||||
writer.stdout().write_all(encoded_spaces_canonical_path.as_bytes())?;
|
writer
|
||||||
|
.stdout()
|
||||||
|
.write_all(encoded_spaces_canonical_path.as_bytes())?;
|
||||||
writer.stdout().write_all(b"\x1b\\")?;
|
writer.stdout().write_all(b"\x1b\\")?;
|
||||||
// Only this part is visible.
|
// Only this part is visible.
|
||||||
writer.write_str(path)?;
|
writer.write_str(path)?;
|
||||||
@ -271,7 +273,6 @@ fn encode_spaces(path: &str) -> String {
|
|||||||
path.replace(" ", "%20")
|
path.replace(" ", "%20")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn write_ansi(output: &mut Vec<u8>, command: impl Command) {
|
pub fn write_ansi(output: &mut Vec<u8>, command: impl Command) {
|
||||||
struct FmtWriter<'a>(&'a mut Vec<u8>);
|
struct FmtWriter<'a>(&'a mut Vec<u8>);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user