Merge #92: fix ci: wrong linter command for gui

635903118e07e9bc06b07c839e9fb2040ce36874 gui: fix clippy errors (edouard)
4489b05dda6c0104f3b4ec66064f249b34d4eeab fix ci: linter gui (edouard)

Pull request description:

ACKs for top commit:
  edouardparis:
    Self-ACK 635903118e07e9bc06b07c839e9fb2040ce36874

Tree-SHA512: 1ee48657edc1733486036e99604c1cf9ac6d41e36fee92fcc9c039ad5ef64061e10fc48f9b82ce0c7993c0d8675e6d3d8fae4194c4fe3b7bd95b6a18b1702d43
This commit is contained in:
edouard 2022-11-16 10:30:31 +01:00
commit 04c85d6066
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F
2 changed files with 14 additions and 6 deletions

View File

@ -58,7 +58,11 @@ jobs:
- name: rustfmt
run: cd gui && cargo fmt -- --check
- name: clippy
run: cargo clippy --all-features --all-targets -- -D warnings
run: |
sudo apt-get update &
sudo apt-get install --allow-downgrades libudev1=245.4-4ubuntu3 libudev-dev=245.4-4ubuntu3 pkg-config libxkbcommon-dev libvulkan-dev &&
cd gui &&
cargo clippy --all-features --all-targets -- -D warnings
unit_tests_gui:
needs: linter_gui
@ -89,4 +93,8 @@ jobs:
run: cd gui && cargo test --verbose --color always -- --nocapture
- name: Test on Rust ${{ matrix.toolchain }} (non Windows)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update & sudo apt-get install --allow-downgrades libudev1=245.4-4ubuntu3 libudev-dev=245.4-4ubuntu3 pkg-config libxkbcommon-dev libvulkan-dev && cd gui && cargo test --verbose --color always -- --nocapture
run: |
sudo apt-get update &
sudo apt-get install --allow-downgrades libudev1=245.4-4ubuntu3 libudev-dev=245.4-4ubuntu3 pkg-config libxkbcommon-dev libvulkan-dev &&
cd gui &&
cargo test --verbose --color always -- --nocapture

View File

@ -121,7 +121,7 @@ impl Step for DefineDescriptor {
self.user_xpub.valid = key.is_ok();
// Check the Network
if let Ok(key) = &key {
self.user_xpub.valid = check_key_network(&key, ctx.bitcoin_config.network);
self.user_xpub.valid = check_key_network(key, ctx.bitcoin_config.network);
}
}
@ -130,7 +130,7 @@ impl Step for DefineDescriptor {
self.heir_xpub.valid = key.is_ok();
// Check the Network
if let Ok(key) = &key {
self.heir_xpub.valid = check_key_network(&key, ctx.bitcoin_config.network);
self.heir_xpub.valid = check_key_network(key, ctx.bitcoin_config.network);
}
}
@ -158,13 +158,13 @@ impl Step for DefineDescriptor {
let user_key = DescriptorPublicKey::from_str(&self.user_xpub.value);
self.user_xpub.valid = user_key.is_ok();
if let Ok(key) = &user_key {
self.user_xpub.valid = check_key_network(&key, ctx.bitcoin_config.network);
self.user_xpub.valid = check_key_network(key, ctx.bitcoin_config.network);
}
let heir_key = DescriptorPublicKey::from_str(&self.heir_xpub.value);
self.heir_xpub.valid = heir_key.is_ok();
if let Ok(key) = &heir_key {
self.heir_xpub.valid = check_key_network(&key, ctx.bitcoin_config.network);
self.heir_xpub.valid = check_key_network(key, ctx.bitcoin_config.network);
}
let sequence = self.sequence.value.parse::<u16>();