diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-25 14:37:17 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-25 14:37:17 +0100 |
| commit | d6faad17e814d252a72e3aca39a4b3898382bab9 (patch) | |
| tree | 16a238703293fe0d9cce04fa83de2af4a88f5433 /src/lib/repo_state.rs | |
| parent | 4f84dc460c3494286233afe9ca480d3b7c0186b1 (diff) | |
chore: bump rust-nostr v0.35
bump all rust-nostr packages
Diffstat (limited to 'src/lib/repo_state.rs')
| -rw-r--r-- | src/lib/repo_state.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/repo_state.rs b/src/lib/repo_state.rs index a5cebab..c39db34 100644 --- a/src/lib/repo_state.rs +++ b/src/lib/repo_state.rs | |||
| @@ -15,12 +15,12 @@ impl RepoState { | |||
| 15 | let event = state_events.first().context("no state events")?; | 15 | let event = state_events.first().context("no state events")?; |
| 16 | let mut state = HashMap::new(); | 16 | let mut state = HashMap::new(); |
| 17 | for tag in &event.tags { | 17 | for tag in &event.tags { |
| 18 | if let Some(name) = tag.as_vec().first() { | 18 | if let Some(name) = tag.as_slice().first() { |
| 19 | if ["refs/heads/", "refs/tags", "HEAD"] | 19 | if ["refs/heads/", "refs/tags", "HEAD"] |
| 20 | .iter() | 20 | .iter() |
| 21 | .any(|s| name.starts_with(*s)) | 21 | .any(|s| name.starts_with(*s)) |
| 22 | { | 22 | { |
| 23 | if let Some(value) = tag.as_vec().get(1) { | 23 | if let Some(value) = tag.as_slice().get(1) { |
| 24 | if Oid::from_str(value).is_ok() || value.contains("ref: refs/") { | 24 | if Oid::from_str(value).is_ok() || value.contains("ref: refs/") { |
| 25 | state.insert(name.to_owned(), value.to_owned()); | 25 | state.insert(name.to_owned(), value.to_owned()); |
| 26 | } | 26 | } |