Compare commits

..

3 Commits

Author SHA1 Message Date
62c2b8c158 test code 2026-03-06 15:55:44 +01:00
0b9daf395d image base64 + json write 2026-03-06 15:47:29 +01:00
51f6b5bfab png conversion 2026-03-06 12:43:34 +01:00
8 changed files with 2335 additions and 37 deletions

802
Cargo.lock generated

File diff suppressed because it is too large Load Diff

1397
rklipd/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,3 +4,9 @@ version = "0.1.0"
edition = "2024"
[dependencies]
arboard = "3.6.1"
image = "0.25.9"
serde = {version = "1.0.228", features = ["derive"]}
serde_json = "1.0.149"
serde_millis = "0.1.1"
base64 = "0.22.1"

View File

@ -1,30 +1,112 @@
use std::time::SystemTime;
use arboard::{Clipboard, ImageData};
use image::codecs::png::PngEncoder;
use image::{ExtendedColorType, ImageEncoder};
use serde::{Deserialize, Serialize};
use std::fs::{self, File};
use std::io::Write;
use std::path::Path;
use std::result::Result;
use std::{error::Error, time::SystemTime};
#[derive(Serialize, Deserialize, Debug)]
pub struct ClipboardEntry {
pub content: ClipboardData,
#[serde(with = "serde_millis")]
pub timestamp: SystemTime,
}
#[derive(Serialize, Deserialize, Debug)]
pub enum ClipboardData {
Text(String),
Image(Vec<u8>), // png storage
#[serde(with = "base64_vec")]
Image(Vec<u8>),
}
mod base64_vec {
use serde::{Deserialize, Deserializer, Serializer};
pub fn serialize<S: Serializer>(v: &Vec<u8>, serializer: S) -> Result<S::Ok, S::Error> {
let base64_str = base64::encode(v);
serializer.serialize_str(&base64_str)
}
pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Vec<u8>, D::Error> {
let base64_str = String::deserialize(deserializer)?;
match base64::decode(base64_str) {
Ok(bytes) => Ok(bytes),
Err(error_base64) => {
let error_serde = serde::de::Error::custom(error_base64);
Err(error_serde)
}
}
}
}
pub trait ImageDataExt {
fn to_png(&self) -> Result<Vec<u8>, Box<dyn Error>>;
}
impl ImageDataExt for ImageData<'_> {
fn to_png(&self) -> Result<Vec<u8>, Box<dyn Error>> {
let mut buffer = Vec::new();
let encoder = PngEncoder::new(&mut buffer);
encoder.write_image(
&self.bytes,
self.width as u32,
self.height as u32,
ExtendedColorType::Rgba8,
)?;
Ok(buffer)
}
}
impl ClipboardData {
fn is_text(&self) -> bool {
pub fn is_text(&self) -> bool {
match self {
ClipboardData::Text(_) => true,
ClipboardData::Image(_) => false,
}
}
fn is_image(&self) -> bool {
pub fn is_image(&self) -> bool {
!self.is_text()
}
}
impl ClipboardEntry {
fn new() -> ClipboardData {
unimplemented!()
pub fn new(clipboard: &mut Clipboard) -> Result<ClipboardEntry, Box<dyn Error>> {
let clipboard_data_opt: Option<ClipboardData> = match clipboard.get_text() {
Ok(text) => Some(ClipboardData::Text(text)),
Err(_) => match clipboard.get_image() {
Ok(image) => Some(ClipboardData::Image(image.to_png()?)),
Err(_) => None,
},
};
let Some(clipboard_data) = clipboard_data_opt else {
return Err("Clipboard empty".into());
};
Ok(ClipboardEntry {
content: clipboard_data,
timestamp: SystemTime::now(),
})
}
pub fn new_json(path: &str) -> Result<(), Box<dyn Error>> {
if Path::new(path).exists() {
Err("File already exists.".into())
} else {
File::create(path)?;
Ok(())
}
}
pub fn write_entry_json(&self, path: &str) -> Result<(), Box<dyn Error>> {
let json = serde_json::to_string_pretty(self)?;
let mut file = File::create(path)?;
file.write_all(json.as_bytes())?;
Ok(())
}
pub fn read_entry_json(path: &str) -> Result<Self, Box<dyn Error>> {
let data = fs::read_to_string(path)?;
let entry: ClipboardEntry = serde_json::from_str(&data)?;
Ok(entry)
}
}

View File

@ -1,3 +1,16 @@
fn main() {
println!("Hello, world!");
use arboard::Clipboard;
use rklipd::ClipboardEntry;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
let mut clipboard = Clipboard::new()?;
let entry = ClipboardEntry::new(&mut clipboard)?;
let path = "clipboard.json";
match ClipboardEntry::new_json(path) {
Ok(_) => println!("JSON file created {}", path),
Err(e) => println!("{}", e),
}
entry.write_entry_json(path)?;
let loaded_entry = ClipboardEntry::read_entry_json(path)?;
Ok(())
}

View File

@ -1,16 +1,18 @@
0.007007011s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: stale: changed "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs"
0.007017906s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: (vs) "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-f4e8ac4b4add01be/dep-lib-rklipd"
0.007020261s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: FileTime { seconds: 1772749468, nanos: 407758665 } < FileTime { seconds: 1772749469, nanos: 307772201 }
0.007048268s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: false }/TargetInner { name_inferred: true, ..: lib_target("rklipd", ["lib"], "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", Edition2024) }
0.007057460s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleItem(ChangedFile { reference: "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-f4e8ac4b4add01be/dep-lib-rklipd", reference_mtime: FileTime { seconds: 1772749468, nanos: 407758665 }, stale: "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", stale_mtime: FileTime { seconds: 1772749469, nanos: 307772201 } }))
0.007185539s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: stale: changed "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs"
0.007188300s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: (vs) "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-76b1f7e91bbf555b/dep-test-lib-rklipd"
0.007190069s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: FileTime { seconds: 1772749468, nanos: 407758665 } < FileTime { seconds: 1772749469, nanos: 307772201 }
0.007201335s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: true }/TargetInner { name_inferred: true, ..: lib_target("rklipd", ["lib"], "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", Edition2024) }
0.007206115s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleItem(ChangedFile { reference: "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-76b1f7e91bbf555b/dep-test-lib-rklipd", reference_mtime: FileTime { seconds: 1772749468, nanos: 407758665 }, stale: "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", stale_mtime: FileTime { seconds: 1772749469, nanos: 307772201 } }))
0.007280086s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: false }/TargetInner { name: "rklipd", doc: true, ..: with_path("/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs", Edition2024) }
0.007284923s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleDepFingerprint { name: "rklipd" })
0.007357789s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: true }/TargetInner { name: "rklipd", doc: true, ..: with_path("/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs", Edition2024) }
0.007362148s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleDepFingerprint { name: "rklipd" })
0.008086460s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: stale: changed "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs"
0.008096266s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: (vs) "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-f4e8ac4b4add01be/dep-lib-rklipd"
0.008098611s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: FileTime { seconds: 1772782350, nanos: 977702370 } < FileTime { seconds: 1772782453, nanos: 782562571 }
0.008125724s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: false }/TargetInner { name_inferred: true, ..: lib_target("rklipd", ["lib"], "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", Edition2024) }
0.008132926s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleItem(ChangedFile { reference: "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-f4e8ac4b4add01be/dep-lib-rklipd", reference_mtime: FileTime { seconds: 1772782350, nanos: 977702370 }, stale: "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", stale_mtime: FileTime { seconds: 1772782453, nanos: 782562571 } }))
0.008246920s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: stale: changed "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs"
0.008250078s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: (vs) "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-76b1f7e91bbf555b/dep-test-lib-rklipd"
0.008251942s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: FileTime { seconds: 1772782350, nanos: 977702370 } < FileTime { seconds: 1772782453, nanos: 782562571 }
0.008264092s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: true }/TargetInner { name_inferred: true, ..: lib_target("rklipd", ["lib"], "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", Edition2024) }
0.008269311s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleItem(ChangedFile { reference: "/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/.fingerprint/rklipd-76b1f7e91bbf555b/dep-test-lib-rklipd", reference_mtime: FileTime { seconds: 1772782350, nanos: 977702370 }, stale: "/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs", stale_mtime: FileTime { seconds: 1772782453, nanos: 782562571 } }))
0.008335046s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: false }/TargetInner { name: "rklipd", doc: true, ..: with_path("/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs", Edition2024) }
0.008340956s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleDepFingerprint { name: "rklipd" })
0.008414389s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: fingerprint dirty for rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)/Check { test: true }/TargetInner { name: "rklipd", doc: true, ..: with_path("/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs", Edition2024) }
0.008419232s INFO prepare_target{force=false package_id=rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd) target="rklipd"}: cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleDepFingerprint { name: "rklipd" })
Checking rklipd v0.1.0 (/home/zefad/Documents/Code/Rust/rklip/rklipd)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
error: could not compile `rklipd` (lib test) due to 3 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
error: could not compile `rklipd` (lib) due to 3 previous errors; 1 warning emitted

View File

@ -1,11 +1,11 @@
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"methods `is_text` and `is_image` are never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":203,"byte_end":221,"line_start":13,"line_end":13,"column_start":1,"column_end":19,"is_primary":false,"text":[{"text":"impl ClipboardData {","highlight_start":1,"highlight_end":19}],"label":"methods in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":231,"byte_end":238,"line_start":14,"line_end":14,"column_start":8,"column_end":15,"is_primary":true,"text":[{"text":" fn is_text(&self) -> bool {","highlight_start":8,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":391,"byte_end":399,"line_start":21,"line_end":21,"column_start":8,"column_end":16,"is_primary":true,"text":[{"text":" fn is_image(&self) -> bool {","highlight_start":8,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: methods `is_text` and `is_image` are never used\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:14:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m13\u001b[0m \u001b[1m\u001b[94m|\u001b[0m impl ClipboardData {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m------------------\u001b[0m \u001b[1m\u001b[94mmethods in this implementation\u001b[0m\n\u001b[1m\u001b[94m14\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn is_text(&self) -> bool {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn is_image(&self) -> bool {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"associated function `new` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":450,"byte_end":469,"line_start":26,"line_end":26,"column_start":1,"column_end":20,"is_primary":false,"text":[{"text":"impl ClipboardEntry {","highlight_start":1,"highlight_end":20}],"label":"associated function in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":479,"byte_end":482,"line_start":27,"line_end":27,"column_start":8,"column_end":11,"is_primary":true,"text":[{"text":" fn new() -> ClipboardData {","highlight_start":8,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: associated function `new` is never used\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:27:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m26\u001b[0m \u001b[1m\u001b[94m|\u001b[0m impl ClipboardEntry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-------------------\u001b[0m \u001b[1m\u001b[94massociated function in this implementation\u001b[0m\n\u001b[1m\u001b[94m27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn new() -> ClipboardData {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"methods `is_text` and `is_image` are never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":203,"byte_end":221,"line_start":13,"line_end":13,"column_start":1,"column_end":19,"is_primary":false,"text":[{"text":"impl ClipboardData {","highlight_start":1,"highlight_end":19}],"label":"methods in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":231,"byte_end":238,"line_start":14,"line_end":14,"column_start":8,"column_end":15,"is_primary":true,"text":[{"text":" fn is_text(&self) -> bool {","highlight_start":8,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":391,"byte_end":399,"line_start":21,"line_end":21,"column_start":8,"column_end":16,"is_primary":true,"text":[{"text":" fn is_image(&self) -> bool {","highlight_start":8,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: methods `is_text` and `is_image` are never used\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:14:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m13\u001b[0m \u001b[1m\u001b[94m|\u001b[0m impl ClipboardData {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m------------------\u001b[0m \u001b[1m\u001b[94mmethods in this implementation\u001b[0m\n\u001b[1m\u001b[94m14\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn is_text(&self) -> bool {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn is_image(&self) -> bool {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"methods called `new` usually return `Self`","code":{"code":"clippy::new_ret_no_self","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":476,"byte_end":534,"line_start":27,"line_end":29,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":" fn new() -> ClipboardData {","highlight_start":5,"highlight_end":32},{"text":" unimplemented!()","highlight_start":1,"highlight_end":25},{"text":" }","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::new_ret_no_self)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: methods called `new` usually return `Self`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:27:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m/\u001b[0m fn new() -> ClipboardData {\n\u001b[1m\u001b[94m28\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|\u001b[0m unimplemented!()\n\u001b[1m\u001b[94m29\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|\u001b[0m }\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|_____^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(clippy::new_ret_no_self)]` on by default\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"associated function `new` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":450,"byte_end":469,"line_start":26,"line_end":26,"column_start":1,"column_end":20,"is_primary":false,"text":[{"text":"impl ClipboardEntry {","highlight_start":1,"highlight_end":20}],"label":"associated function in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":479,"byte_end":482,"line_start":27,"line_end":27,"column_start":8,"column_end":11,"is_primary":true,"text":[{"text":" fn new() -> ClipboardData {","highlight_start":8,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: associated function `new` is never used\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:27:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m26\u001b[0m \u001b[1m\u001b[94m|\u001b[0m impl ClipboardEntry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m-------------------\u001b[0m \u001b[1m\u001b[94massociated function in this implementation\u001b[0m\n\u001b[1m\u001b[94m27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m fn new() -> ClipboardData {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"methods called `new` usually return `Self`","code":{"code":"clippy::new_ret_no_self","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":476,"byte_end":534,"line_start":27,"line_end":29,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":" fn new() -> ClipboardData {","highlight_start":5,"highlight_end":32},{"text":" unimplemented!()","highlight_start":1,"highlight_end":25},{"text":" }","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::new_ret_no_self)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: methods called `new` usually return `Self`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:27:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m/\u001b[0m fn new() -> ClipboardData {\n\u001b[1m\u001b[94m28\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|\u001b[0m unimplemented!()\n\u001b[1m\u001b[94m29\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|\u001b[0m }\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m|_____^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#new_ret_no_self\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(clippy::new_ret_no_self)]` on by default\n\n"}}
{"reason":"compiler-artifact","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/deps/librklipd-76b1f7e91bbf555b.rmeta"],"executable":null,"fresh":false}
{"reason":"compiler-artifact","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/deps/librklipd-f4e8ac4b4add01be.rmeta"],"executable":null,"fresh":false}
{"reason":"compiler-artifact","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/deps/librklipd-2a6d3df2caa9729d.rmeta"],"executable":null,"fresh":false}
{"reason":"compiler-artifact","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/home/zefad/Documents/Code/Rust/rklip/rklipd/target/debug/deps/librklipd-2d822a811f51945a.rmeta"],"executable":null,"fresh":false}
{"reason":"build-finished","success":true}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"expected `;`, found keyword `pub`","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":35,"byte_end":38,"line_start":4,"line_end":4,"column_start":1,"column_end":4,"is_primary":false,"text":[{"text":"pub struct ClipboardEntry {","highlight_start":1,"highlight_end":4}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":33,"byte_end":33,"line_start":2,"line_end":2,"column_start":7,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":7,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add `;` here","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":33,"byte_end":33,"line_start":2,"line_end":2,"column_start":7,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":7,"highlight_end":7}],"label":null,"suggested_replacement":";","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: expected `;`, found keyword `pub`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:7\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mhelp: add `;` here\u001b[0m\n\u001b[1m\u001b[94m3\u001b[0m \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct ClipboardEntry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---\u001b[0m \u001b[1m\u001b[94munexpected token\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"expected `;`, found keyword `pub`","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":35,"byte_end":38,"line_start":4,"line_end":4,"column_start":1,"column_end":4,"is_primary":false,"text":[{"text":"pub struct ClipboardEntry {","highlight_start":1,"highlight_end":4}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lib.rs","byte_start":33,"byte_end":33,"line_start":2,"line_end":2,"column_start":7,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":7,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add `;` here","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":33,"byte_end":33,"line_start":2,"line_end":2,"column_start":7,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":7,"highlight_end":7}],"label":null,"suggested_replacement":";","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: expected `;`, found keyword `pub`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:7\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mhelp: add `;` here\u001b[0m\n\u001b[1m\u001b[94m3\u001b[0m \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m4\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct ClipboardEntry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---\u001b[0m \u001b[1m\u001b[94munexpected token\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"expected type, found `)`","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":690,"byte_end":691,"line_start":35,"line_end":35,"column_start":40,"column_end":41,"is_primary":true,"text":[{"text":" pub fn add_entry(&self, clipboard: ) {","highlight_start":40,"highlight_end":41}],"label":"expected type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: expected type, found `)`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:35:40\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m35\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub fn add_entry(&self, clipboard: ) {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mexpected type\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"expected type, found `)`","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":690,"byte_end":691,"line_start":35,"line_end":35,"column_start":40,"column_end":41,"is_primary":true,"text":[{"text":" pub fn add_entry(&self, clipboard: ) {","highlight_start":40,"highlight_end":41}],"label":"expected type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: expected type, found `)`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:35:40\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m35\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub fn add_entry(&self, clipboard: ) {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^\u001b[0m \u001b[1m\u001b[91mexpected type\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"unresolved import `ar`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":31,"byte_end":33,"line_start":2,"line_end":2,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":5,"highlight_end":7}],"label":"no external crate `ar`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `ar`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^\u001b[0m \u001b[1m\u001b[91mno external crate `ar`\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"unresolved import `ar`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":31,"byte_end":33,"line_start":2,"line_end":2,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":5,"highlight_end":7}],"label":"no external crate `ar`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `ar`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^\u001b[0m \u001b[1m\u001b[91mno external crate `ar`\u001b[0m\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"this import is redundant","code":{"code":"clippy::single_component_path_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":27,"byte_end":33,"line_start":2,"line_end":2,"column_start":1,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":1,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#single_component_path_imports","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::single_component_path_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove it entirely","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":27,"byte_end":34,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use ar","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: this import is redundant\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:1\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m \u001b[1m\u001b[33mhelp: remove it entirely\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#single_component_path_imports\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(clippy::single_component_path_imports)]` on by default\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"this import is redundant","code":{"code":"clippy::single_component_path_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/lib.rs","byte_start":27,"byte_end":33,"line_start":2,"line_end":2,"column_start":1,"column_end":7,"is_primary":true,"text":[{"text":"use ar","highlight_start":1,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#single_component_path_imports","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(clippy::single_component_path_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove it entirely","code":null,"level":"help","spans":[{"file_name":"src/lib.rs","byte_start":27,"byte_end":34,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use ar","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: this import is redundant\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/lib.rs:2:1\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m2\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use ar\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m \u001b[1m\u001b[33mhelp: remove it entirely\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mhelp\u001b[0m: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#single_component_path_imports\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(clippy::single_component_path_imports)]` on by default\n\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"For more information about this error, try `rustc --explain E0432`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about this error, try `rustc --explain E0432`.\u001b[0m\n"}}
{"reason":"compiler-message","package_id":"path+file:///home/zefad/Documents/Code/Rust/rklip/rklipd#0.1.0","manifest_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"rklipd","src_path":"/home/zefad/Documents/Code/Rust/rklip/rklipd/src/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"message":{"$message_type":"diagnostic","message":"For more information about this error, try `rustc --explain E0432`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about this error, try `rustc --explain E0432`.\u001b[0m\n"}}
{"reason":"build-finished","success":false}

View File

@ -1,4 +1,4 @@
use ::arboard::Clipboard;
use arboard::Clipboard;
fn main() {
let Ok(mut clipboard) = Clipboard::new() else {