Skip to content

chore: Suppress dead clipboard code #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brian6932
Copy link

@brian6932 brian6932 commented May 26, 2025

build logs
~
❯ cargo install --git https://github.com/wezm/git-grab
    Updating git repository `https://github.com/wezm/git-grab`
  Installing git-grab v3.0.0 (https://github.com/wezm/git-grab#abb36d2a)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
  Downloaded icu_properties v2.0.1
  Downloaded icu_properties_data v2.0.1
  Downloaded 2 crates (212.8KiB) in 0.41s
   Compiling proc-macro2 v1.0.95
   Compiling unicode-ident v1.0.18
   Compiling stable_deref_trait v1.2.0
   Compiling litemap v0.8.0
   Compiling writeable v0.6.1
   Compiling icu_normalizer_data v2.0.0
   Compiling icu_properties_data v2.0.1
   Compiling windows_x86_64_msvc v0.52.6
   Compiling smallvec v1.15.0
   Compiling percent-encoding v2.3.1
   Compiling utf8_iter v1.0.4
   Compiling error-code v3.3.2
   Compiling pico-args v0.5.0
   Compiling windows-targets v0.52.6
   Compiling windows-sys v0.59.0
   Compiling clipboard-win v5.4.0
   Compiling form_urlencoded v1.2.1
   Compiling quote v1.0.40
   Compiling syn v2.0.101
   Compiling home v0.5.11
   Compiling synstructure v0.13.2
   Compiling zerovec-derive v0.11.1
   Compiling displaydoc v0.2.5
   Compiling zerofrom-derive v0.1.6
   Compiling yoke-derive v0.8.0
   Compiling zerofrom v0.1.6
   Compiling yoke v0.8.0
   Compiling zerovec v0.11.2
   Compiling zerotrie v0.2.2
   Compiling tinystr v0.8.1
   Compiling potential_utf v0.1.2
   Compiling icu_collections v2.0.0
   Compiling icu_locale_core v2.0.0
   Compiling icu_provider v2.0.0
   Compiling icu_normalizer v2.0.0
   Compiling icu_properties v2.0.1
   Compiling idna_adapter v1.2.1
   Compiling idna v1.0.3
   Compiling url v2.5.4
   Compiling git-grab v3.0.0 (~\scoop\persist\rustup-msvc\.cargo\git\checkouts\git-grab-0add277cdc143596\abb36d2)
warning: method `copy` is never used
 --> src\clipboard\providers.rs:9:8
  |
8 | pub trait Clipboard {
  |           --------- method in this trait
9 |     fn copy(&self, text: &str) -> io::Result<()>;
  |        ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: struct `Wayland` is never constructed
  --> src\clipboard\providers.rs:94:8
   |
94 | struct Wayland {}
   |        ^^^^^^^

warning: struct `Klipper` is never constructed
   --> src\clipboard\providers.rs:117:8
    |
117 | struct Klipper {}
    |        ^^^^^^^

warning: struct `Wsl` is never constructed
   --> src\clipboard\providers.rs:147:8
    |
147 | struct Wsl {}
    |        ^^^

warning: `git-grab` (bin "git-grab") generated 4 warnings
    Finished `release` profile [optimized] target(s) in 29.24s
  Installing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
   Installed package `git-grab v3.0.0 (https://github.com/wezm/git-grab#abb36d2a)` (executable `git-grab.exe`)

~
❯ git grab [email protected]:brian6932/git-grab.git
Cloning into '~\src\github.com\brian6932\git-grab'...
remote: Enumerating objects: 211, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (41/41), done.
Receiving objects: 100% (211/211), 76.54 KiB | 4.25 MiB/s, done.
Resolving deltas: 100% (124/124), done.
remote: Total 211 (delta 45), reused 37 (delta 25), pack-reused 144 (from 1)
Grabbed ssh://[email protected]/brian6932/git-grab.git to ~\src\github.com\brian6932\git-grab

~
❯ z ~/src/github.com/brian6932/git-grab

git-grab main ✓
❯ git checkout -b chore/supress-dead_code
Switched to a new branch 'chore/supress-dead_code'

git-grab chore/supress-dead_code
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling proc-macro2 v1.0.95
   Compiling unicode-ident v1.0.18
   Compiling stable_deref_trait v1.2.0
   Compiling litemap v0.8.0
   Compiling writeable v0.6.1
   Compiling icu_properties_data v2.0.1
   Compiling icu_normalizer_data v2.0.0
   Compiling windows_x86_64_msvc v0.52.6
   Compiling smallvec v1.15.0
   Compiling percent-encoding v2.3.1
   Compiling utf8_iter v1.0.4
   Compiling error-code v3.3.2
   Compiling pico-args v0.5.0
   Compiling form_urlencoded v1.2.1
   Compiling clipboard-win v5.4.0
   Compiling windows-targets v0.52.6
   Compiling windows-sys v0.59.0
   Compiling quote v1.0.40
   Compiling home v0.5.11
   Compiling syn v2.0.101
   Compiling synstructure v0.13.2
   Compiling zerovec-derive v0.11.1
   Compiling displaydoc v0.2.5
   Compiling zerofrom-derive v0.1.6
   Compiling yoke-derive v0.8.0
   Compiling zerofrom v0.1.6
   Compiling yoke v0.8.0
   Compiling zerovec v0.11.2
   Compiling zerotrie v0.2.2
   Compiling tinystr v0.8.1
   Compiling potential_utf v0.1.2
   Compiling icu_collections v2.0.0
   Compiling icu_locale_core v2.0.0
   Compiling icu_provider v2.0.0
   Compiling icu_normalizer v2.0.0
   Compiling icu_properties v2.0.1
   Compiling idna_adapter v1.2.1
   Compiling idna v1.0.3
   Compiling url v2.5.4
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
error[E0412]: cannot find type `Wayland` in this scope
  --> src\clipboard\providers.rs:96:20
   |
96 | impl Clipboard for Wayland {
   |                    ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Klipper` in this scope
   --> src\clipboard\providers.rs:121:20
    |
121 | impl Clipboard for Klipper {
    |                    ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Wsl` in this scope
   --> src\clipboard\providers.rs:152:20
    |
152 | impl Clipboard for Wsl {
    |                    ^^^ not found in this scope

For more information about this error, try `rustc --explain E0412`.
error: could not compile `git-grab` (bin "git-grab") due to 3 previous errors
error: failed to compile `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)`, intermediate artifacts can be found at `~\src\github.com\brian6932\git-grab\target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

git-grab chore/supress-dead_code  ~1
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
warning: method `copy` is never used
 --> src\clipboard\providers.rs:9:8
  |
8 | pub trait Clipboard {
  |           --------- method in this trait
9 |     fn copy(&self, text: &str) -> io::Result<()>;
  |        ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `git-grab` (bin "git-grab") generated 1 warning
    Finished `release` profile [optimized] target(s) in 7.70s
   Replacing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
    Replaced package `git-grab v3.0.0 (https://github.com/wezm/git-grab#abb36d2a)` with `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` (executable `git-grab.exe`)
git-grab chore/supress-dead_code  ~1
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
warning: method `copy` is never used
 --> src\clipboard\providers.rs:9:8
  |
8 | pub trait Clipboard {
  |           --------- method in this trait
9 |     fn copy(&self, text: &str) -> io::Result<()>;
  |        ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `git-grab` (bin "git-grab") generated 1 warning
    Finished `release` profile [optimized] target(s) in 7.70s
   Replacing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
    Replaced package `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` with `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` (executable `git-grab.exe`)

git-grab chore/supress-dead_code  ~1 1m52s
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
warning: unused macro definition: `c`
  --> src\clipboard\providers.rs:14:14
   |
14 | macro_rules! c {
   |              ^
   |
   = note: `#[warn(unused_macros)]` on by default

warning: trait `Eat` is never used
  --> src\clipboard\providers.rs:27:7
   |
27 | trait Eat {
   |       ^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: trait `Put` is never used
  --> src\clipboard\providers.rs:44:7
   |
44 | trait Put {
   |       ^^^

warning: `git-grab` (bin "git-grab") generated 3 warnings
    Finished `release` profile [optimized] target(s) in 9.91s
   Replacing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
    Replaced package `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` with `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` (executable `git-grab.exe`)

git-grab chore/supress-dead_code  ~1 7s
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
warning: unused imports: `Command`, `Read`, `Stdio`, and `Write`
 --> src\clipboard\providers.rs:4:16
  |
4 |     io::{self, Read, Write},
  |                ^^^^  ^^^^^
5 |     process::{Command, Stdio},
  |               ^^^^^^^  ^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `git-grab` (bin "git-grab") generated 1 warning (run `cargo fix --bin "git-grab"` to apply 1 suggestion)
    Finished `release` profile [optimized] target(s) in 7.46s
   Replacing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
    Replaced package `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` with `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` (executable `git-grab.exe`)

git-grab chore/supress-dead_code  ~1 2s
❯ cargo install --path .
  Installing git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Updating crates.io index
     Locking 48 packages to latest compatible versions
   Compiling git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)
    Finished `release` profile [optimized] target(s) in 7.33s
   Replacing ~\scoop\persist\rustup-msvc\.cargo\bin\git-grab.exe
    Replaced package `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` with `git-grab v3.0.0 (~\src\github.com\brian6932\git-grab)` (executable `git-grab.exe`)

Unrelated: Android support could easily be added here using termux-clipboard-set & termux-clipboard-get.

@brian6932 brian6932 force-pushed the chore/supress-dead_code branch 2 times, most recently from 8fb572f to 7be35a4 Compare May 26, 2025 10:00
@brian6932 brian6932 force-pushed the chore/supress-dead_code branch from 7be35a4 to e103d42 Compare May 26, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant