Skip to content

Commit 62f27db

Browse files
authored
Merge pull request #94 from winterjung/patch-1
Fix build errors in `clipboard.rs`: correct module import and result type
2 parents e10c199 + fe9ef52 commit 62f27db

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

crates/code2prompt/src/clipboard.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use anyhow::Context;
1313
/// # Returns
1414
///
1515
/// * `Result<()>` - Returns Ok on success, or an error if the clipboard could not be accessed.
16-
pub fn copy_text_to_clipboard(rendered: &str) -> Result<()> {
17-
use anyhow::Result;
16+
pub fn copy_text_to_clipboard(rendered: &str) -> anyhow::Result<()> {
1817
use arboard::Clipboard;
1918
match Clipboard::new() {
2019
Ok(mut clipboard) => {

crates/code2prompt/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn main() -> Result<()> {
211211
}
212212
#[cfg(not(target_os = "linux"))]
213213
{
214-
use code2prompt::copy_text_to_clipboard;
214+
use crate::clipboard::copy_text_to_clipboard;
215215
match copy_text_to_clipboard(&rendered) {
216216
Ok(_) => {
217217
println!(

0 commit comments

Comments
 (0)