From 1575d441724a27854c8f9fe1510a47a3050ae28d Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 27 Oct 2023 23:45:26 +0800 Subject: fix: .copy don't works on some linux distro (#161) --- src/utils/mod.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/utils/mod.rs') diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 3ae1004..4ed0d5a 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -3,7 +3,6 @@ mod tiktoken; use self::tiktoken::cl100k_base; pub use self::tiktoken::{cl100k_base_singleton, count_tokens, text_to_tokens, tokens_to_text}; -use arboard::Clipboard; use chrono::prelude::*; use crossterm::style::{Color, Stylize}; use std::io::{stdout, Write}; @@ -38,11 +37,6 @@ pub fn emphasis(text: &str) -> String { text.stylize().with(Color::White).to_string() } -pub fn copy(src: &str) -> Result<(), arboard::Error> { - let mut clipboard = Clipboard::new()?; - clipboard.set_text(src) -} - pub fn split_text(text: &str) -> Result, anyhow::Error> { let bpe = cl100k_base()?; let tokens = bpe.encode_with_special_tokens(text); -- cgit v1.2.3