Skip to content

Commit cdfc9ce

Browse files
committed
Fix compiler warnings
1 parent 2f230ac commit cdfc9ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use base64::{engine::general_purpose, Engine as _};
12
use copypasta_ext::prelude::*;
23
use copypasta_ext::x11_fork::ClipboardContext;
34
use crossterm::style::Print;
@@ -112,7 +113,10 @@ pub fn copy_string_to_clipboard(content: String) -> Result<CopyType, ()> {
112113
// Check https://github.com/timvisee/rust-clipboard-ext/blob/371df19d2f961882a21c957f396d1e24548d1f28/src/osc52.rs#L92
113114
return match crossterm::execute!(
114115
io::stdout(),
115-
Print(format!("\x1B]52;c;{}\x07", base64::encode(content)))
116+
Print(format!(
117+
"\x1B]52;c;{}\x07",
118+
general_purpose::STANDARD.encode(content)
119+
))
116120
) {
117121
Ok(_) => Ok(CopyType::OSC52),
118122
Err(_) => Err(()),

0 commit comments

Comments
 (0)