Skip to content

Commit dfa2b00

Browse files
authored
Merge pull request #1 from benthecarman/ignore
Add .gitignore + Clippy ci fixes
2 parents 64a45f2 + 3a651a6 commit dfa2b00

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
linting:
4646
runs-on: ubuntu-latest
4747
env:
48-
TOOLCHAIN: stable
48+
TOOLCHAIN: 1.63.0
4949
steps:
5050
- name: Checkout source code
5151
uses: actions/checkout@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
Cargo.lock

ci/check-lint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/sh
22
set -e
33
set -x
4+
5+
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
6+
7+
# Starting with version 1.39.0, the `tokio` crate has an MSRV of rustc 1.70.0
8+
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p tokio --precise "1.38.1" --verbose
9+
[ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p tokio-util --precise "0.7.10" --verbose
10+
411
RUSTFLAGS='-D warnings' cargo clippy -- \
512
`# We use this for sat groupings` \
613
-A clippy::inconsistent-digit-grouping \

src/hrn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl HumanReadableName {
4242
if user.is_empty() || domain.is_empty() {
4343
return Err(());
4444
}
45-
if !str_chars_allowed(&user) || !str_chars_allowed(&domain) {
45+
if !str_chars_allowed(user) || !str_chars_allowed(domain) {
4646
return Err(());
4747
}
4848
let mut contents = [0; 255 - REQUIRED_EXTRA_LEN];
@@ -60,7 +60,7 @@ impl HumanReadableName {
6060
/// If `user` includes the standard BIP 353 ₿ prefix it is automatically removed as required by
6161
/// BIP 353.
6262
pub fn from_encoded(encoded: &str) -> Result<HumanReadableName, ()> {
63-
if let Some((user, domain)) = encoded.strip_prefix('₿').unwrap_or(encoded).split_once("@")
63+
if let Some((user, domain)) = encoded.strip_prefix('₿').unwrap_or(encoded).split_once('@')
6464
{
6565
Self::new(user, domain)
6666
} else {

0 commit comments

Comments
 (0)