mirror of
https://github.com/gitui-org/gitui.git
synced 2026-10-12 02:14:16 +00:00
fix nightly build
This commit is contained in:
@@ -45,6 +45,11 @@ clippy:
|
||||
cargo clean -p gitui -p asyncgit -p scopetime
|
||||
cargo clippy --all-features
|
||||
|
||||
clippy-nightly:
|
||||
touch src/main.rs
|
||||
cargo clean -p gitui -p asyncgit -p scopetime
|
||||
cargo +nightly clippy --all-features
|
||||
|
||||
clippy-pedantic:
|
||||
cargo clean -p gitui -p asyncgit -p scopetime
|
||||
cargo clippy --all-features -- -W clippy::pedantic
|
||||
|
||||
+6
-3
@@ -7,9 +7,12 @@ pub fn copy_string(string: String) -> Result<()> {
|
||||
use anyhow::anyhow;
|
||||
|
||||
let mut ctx: ClipboardContext = ClipboardProvider::new()
|
||||
.map_err(|_| anyhow!("failed to get access to clipboard"))?;
|
||||
ctx.set_contents(string)
|
||||
.map_err(|_| anyhow!("failed to set clipboard contents"))?;
|
||||
.map_err(|e| {
|
||||
anyhow!("failed to get access to clipboard: {}", e)
|
||||
})?;
|
||||
ctx.set_contents(string).map_err(|e| {
|
||||
anyhow!("failed to set clipboard contents: {}", e)
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user