[BUG] install failure (build and cargo run works just fine, however)
sleeplessKomodo opened this issue · 2 comments
sleeplessKomodo commented
Describe the bug
error[E0616]: field `symbol` of struct `ratatui::buffer::Cell` is private
--> src/buffer.rs:113:35
|
113 | let curr_width = cell.symbol.width();
| ^^^^^^ private field
|
help: a method `symbol` also exists, call it with parentheses
|
113 | let curr_width = cell.symbol().width();
| ++
warning: unused import: `unicode_width::UnicodeWidthStr`
--> src/buffer.rs:12:5
|
12 | use unicode_width::UnicodeWidthStr;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
For more information about this error, try `rustc --explain E0616`.
warning: `macchina` (bin "macchina") generated 1 warning
error: could not compile `macchina` (bin "macchina") due to previous error; 1 warning emitted
error: failed to compile `macchina v6.2.0 (/home/user/git/macchina)`, intermediate artifacts can be found at `/home/user/git/macchina/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
To Reproduce
Steps to reproduce the behaviour:
- cloned the repo
$ cargo build
success
- ran the project
$ cargo run
success
- install the project
$ cargo install --path .
no success
Expected behaviour
I expected it to install without errors, since I can run the program just fine.
System Information
a8888b. Host - user@nobara
d888888b. Machine - To Be Filled By O.E.M.
8P"YP"Y88 Kernel - 6.7.0-204.fsync.fc39.x86_64
8|o||o|88 Distro - Nobara Linux 39 (KDE Plasma)
8' .88 DE - KDE
8`._.' Y8. WM - kwin_wayland_wr (Wayland)
d/ `8b. Packages - 4 (dpkg), 5048 (rpm), 2 (cargo), 48 (flatpak), 8 (snap)
dP Y8b. Shell - bash
d8: ::88b. Terminal - alacritty
d8" 'Y88b Resolution - 1600x900, 2560x1440
:8P :888 Uptime - 10h 13m
8a. _a88P CPU - AMD Ryzen 7 3700X 8-Core Processor (32)
._/"Yaa .| 88P| CPU Load - 1%
\ YP" `| `. Memory - 9.5 GB / 32.8 GB
/ \.___.d| .' GPU - TU104 [GeForce RTX 2080 SUPER]
`--..__) `._.' Disk Space - 875.4 GB / 1022.6 GB
- macchina v6.2.0
- rust v1.75
(I assume I could just copy the executable from the debug location to my systems' path, but this error would still be unexplained now wouldn't it?)
clin1234 commented
Similar issue while compiling from Git through cargo
on Windows, except with one more error:
error[E0382]: use of moved value: `text`
--> src\ascii.rs:80:8
|
78 | let mut text = buffer.i...
| -------- move occurs because `text` has type `Text<'_>`, which does not implement the `Copy` trait
79 | text.patch_style(Style:...
| ---- value moved here
80 | Ok(text)
| ^^^^ value used here after move
|
help: consider cloning the value if the performance cost is acceptable
|
79 | text.clone().patch_style(Style::default().fg(color));
| ++++++++
grtcdr commented
Fixed in #310 thanks to @FantasyTeddy.