test code
This commit is contained in:
@ -1 +1,16 @@
|
||||
fn main() {}
|
||||
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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user