mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-27 11:03:03 +03:00
fix nightly build
This commit is contained in:
parent
17240e47fc
commit
a991810f01
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 New Issue
Block a user