1
0
Fork 0

Formatting

This commit is contained in:
Taylor Holliday 2023-02-21 15:26:22 -08:00
parent ffdc278e97
commit 0675273801

View file

@ -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,
}; };