mirror of
https://github.com/gitui-org/gitui
synced 2026-05-22 08:29:20 +00:00
fix nightly build
This commit is contained in:
parent
17240e47fc
commit
a991810f01
2 changed files with 11 additions and 3 deletions
5
Makefile
5
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue