Skip to content

Commit d90f86d

Browse files
committed
side by side
1 parent 8556f9a commit d90f86d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/main.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
fn main() {
2+
23
let ascii="
34
`:+ssssossossss+-`
45
.oys///oyhddddhyo///sy+.
@@ -40,5 +41,10 @@ GPU: Intel HD Graphics 620
4041
Memory: 295MiB / 7743MiB
4142
";
4243

43-
println!("{} {}", ascii, info);
44+
//println!("{} {}", ascii, info);
45+
46+
let left_pad = ascii.lines().map(|l| l.len()).max().unwrap_or(0) + 5;
47+
for (a,b) in ascii.lines().zip(info.lines()) {
48+
println!("{:width$} {}", a, b, width = left_pad);
49+
}
4450
}

0 commit comments

Comments
 (0)