Formatting
This commit is contained in:
parent
ffdc278e97
commit
0675273801
|
@ -488,14 +488,14 @@ pub enum ClipboardDataType {
|
||||||
String,
|
String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn copy_to_clipboard(data: String, dataType: ClipboardDataType) {
|
pub fn copy_to_clipboard(data: String, data_type: ClipboardDataType) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let pb = NSPasteboard::generalPasteboard(nil);
|
let pb = NSPasteboard::generalPasteboard(nil);
|
||||||
|
|
||||||
let data =
|
let data =
|
||||||
NSData::dataWithBytes_length_(nil, data.as_ptr() as *const c_void, data.len() as u64);
|
NSData::dataWithBytes_length_(nil, data.as_ptr() as *const c_void, data.len() as u64);
|
||||||
|
|
||||||
let pb_type = match dataType {
|
let pb_type = match data_type {
|
||||||
ClipboardDataType::String => cocoa::appkit::NSPasteboardTypeString,
|
ClipboardDataType::String => cocoa::appkit::NSPasteboardTypeString,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue