summaryrefslogtreecommitdiff
path: root/copypasta/examples/hello_world.rs
blob: 7d637f82000e620bddcec867cfdc94b9933e34c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
extern crate copypasta;

use copypasta::ClipboardContext;
use copypasta::ClipboardProvider;

fn main() {
    let mut ctx = ClipboardContext::new().unwrap();

    let the_string = "Hello, world!";

    ctx.set_contents(the_string.to_owned()).unwrap();
}