Skip to content

Commit a6f5256

Browse files
authored
Merge pull request #327 from korpling/fix-windows-runner
Changed GitHub Runner to windows-2025
2 parents 8ead8ff + 0b5f260 commit a6f5256

12 files changed

Lines changed: 62 additions & 25 deletions

File tree

.github/workflows/release_capi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
omitPrereleaseDuringUpdate: true
4343
deploy_windows_binaries:
4444
if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
45-
runs-on: windows-2019
45+
runs-on: windows-2025
4646
steps:
4747
- id: latest-release
4848
uses: pozetroninc/github-action-get-latest-release@v0.7.0

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: mdbook build docs/
2727
test_windows:
2828
name: Execute automated tests on Windows
29-
runs-on: windows-2019
29+
runs-on: windows-2025
3030
steps:
3131
- uses: actions/checkout@v2
3232
- uses: actions-rust-lang/setup-rust-toolchain@v1.8.0

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
### Fixed
9+
10+
- Changed GitHub Runner to windows-2025
11+
812
## [3.8.2] - 2025-08-11
913

1014
### Fixed

core/src/annostorage/inmemory.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@ where
259259
Ok(())
260260
}
261261

262-
fn remove_annotation_for_item(&mut self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>> {
262+
fn remove_annotation_for_item(
263+
&mut self,
264+
item: &T,
265+
key: &AnnoKey,
266+
) -> Result<Option<Cow<'_, str>>> {
263267
let mut result = None;
264268

265269
let orig_key = key;
@@ -389,7 +393,7 @@ where
389393
Ok(self.total_number_of_annos == 0)
390394
}
391395

392-
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>> {
396+
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<'_, str>>> {
393397
if let (Some(key_symbol), Some(all_annos)) =
394398
(self.anno_keys.get_symbol(key), self.by_container.get(item))
395399
{
@@ -829,7 +833,11 @@ where
829833
}
830834
}
831835

832-
fn guess_most_frequent_value(&self, ns: Option<&str>, name: &str) -> Result<Option<Cow<str>>> {
836+
fn guess_most_frequent_value(
837+
&self,
838+
ns: Option<&str>,
839+
name: &str,
840+
) -> Result<Option<Cow<'_, str>>> {
833841
// find all complete keys which have the given name (and namespace if given)
834842
let qualified_keys = match ns {
835843
Some(ns) => vec![AnnoKey {
@@ -868,7 +876,11 @@ where
868876
}
869877
}
870878

871-
fn get_all_values(&self, key: &AnnoKey, most_frequent_first: bool) -> Result<Vec<Cow<str>>> {
879+
fn get_all_values(
880+
&self,
881+
key: &AnnoKey,
882+
most_frequent_first: bool,
883+
) -> Result<Vec<Cow<'_, str>>> {
872884
if let Some(key) = self.anno_keys.get_symbol(key) {
873885
if let Some(values_for_key) = self.by_anno.get(&key) {
874886
if most_frequent_first {

core/src/annostorage/mod.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ where
185185

186186
/// Remove the annotation given by its `key` for a specific `item`
187187
/// Returns the value for that annotation, if it existed.
188-
fn remove_annotation_for_item(&mut self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>>;
188+
fn remove_annotation_for_item(
189+
&mut self,
190+
item: &T,
191+
key: &AnnoKey,
192+
) -> Result<Option<Cow<'_, str>>>;
189193

190194
/// Remove all annotations for the given item. Returns whether the item had
191195
/// any annotations.
@@ -201,7 +205,7 @@ where
201205
fn get_annotations_for_item(&self, item: &T) -> Result<Vec<Annotation>>;
202206

203207
/// Get the annotation for a given `item` and the annotation `key`.
204-
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>>;
208+
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<'_, str>>>;
205209

206210
/// Returns `true` if the given `item` has an annotation for the given `key`.
207211
fn has_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<bool>;
@@ -243,7 +247,7 @@ where
243247
) -> Box<dyn Iterator<Item = Result<Match>> + 'a>;
244248

245249
/// Returns an iterator for all items where the value matches the regular expression.
246-
/// The annotation `name` and the `pattern` for the value must be given as argument, the
250+
/// The annotation `name` and the `pattern` for the value must be given as argument, the
247251
/// `namespace` argument is optional and can be used as additional constraint.
248252
///
249253
/// - `namespace`- If given, only annotations having this namespace are returned.
@@ -287,11 +291,16 @@ where
287291
/// Estimate the most frequent value for a given annotation `name` with an optional namespace (`ns`).
288292
///
289293
/// If more than one qualified annotation name matches the defnition, the more frequent value is used.
290-
fn guess_most_frequent_value(&self, ns: Option<&str>, name: &str) -> Result<Option<Cow<str>>>;
294+
fn guess_most_frequent_value(
295+
&self,
296+
ns: Option<&str>,
297+
name: &str,
298+
) -> Result<Option<Cow<'_, str>>>;
291299

292300
/// Return a list of all existing values for a given annotation `key`.
293301
/// If the `most_frequent_first` parameter is true, the results are sorted by their frequency.
294-
fn get_all_values(&self, key: &AnnoKey, most_frequent_first: bool) -> Result<Vec<Cow<str>>>;
302+
fn get_all_values(&self, key: &AnnoKey, most_frequent_first: bool)
303+
-> Result<Vec<Cow<'_, str>>>;
295304

296305
/// Get all the annotation keys which are part of this annotation storage
297306
fn annotation_keys(&self) -> Result<Vec<AnnoKey>>;

core/src/annostorage/ondisk.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,11 @@ where
463463
Ok(result)
464464
}
465465

466-
fn remove_annotation_for_item(&mut self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>> {
466+
fn remove_annotation_for_item(
467+
&mut self,
468+
item: &T,
469+
key: &AnnoKey,
470+
) -> Result<Option<Cow<'_, str>>> {
467471
// remove annotation from by_container
468472
if let Some(symbol_id) = self.anno_key_symbols.get_symbol(key) {
469473
let by_container_key = create_by_container_key(item.clone(), symbol_id);
@@ -539,7 +543,7 @@ where
539543
self.by_container.is_empty()
540544
}
541545

542-
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<str>>> {
546+
fn get_value_for_item(&self, item: &T, key: &AnnoKey) -> Result<Option<Cow<'_, str>>> {
543547
if let Some(symbol_id) = self.anno_key_symbols.get_symbol(key) {
544548
let raw = self
545549
.by_container
@@ -970,7 +974,11 @@ where
970974
}
971975
}
972976

973-
fn guess_most_frequent_value(&self, ns: Option<&str>, name: &str) -> Result<Option<Cow<str>>> {
977+
fn guess_most_frequent_value(
978+
&self,
979+
ns: Option<&str>,
980+
name: &str,
981+
) -> Result<Option<Cow<'_, str>>> {
974982
// find all complete keys which have the given name (and namespace if given)
975983
let qualified_keys = match ns {
976984
Some(ns) => vec![AnnoKey {
@@ -1007,7 +1015,11 @@ where
10071015
}
10081016
}
10091017

1010-
fn get_all_values(&self, key: &AnnoKey, most_frequent_first: bool) -> Result<Vec<Cow<str>>> {
1018+
fn get_all_values(
1019+
&self,
1020+
key: &AnnoKey,
1021+
most_frequent_first: bool,
1022+
) -> Result<Vec<Cow<'_, str>>> {
10111023
if most_frequent_first {
10121024
let mut values_with_count: HashMap<String, usize> = HashMap::default();
10131025
for item in self.get_by_anno_qname_range(key) {

core/src/util/disk_collections.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ where
117117
Ok(())
118118
}
119119

120-
pub fn get(&self, key: &K) -> Result<Option<Cow<V>>> {
120+
pub fn get(&self, key: &K) -> Result<Option<Cow<'_, V>>> {
121121
// Check C0 first
122122
if let Some(entry) = self.c0.get(key) {
123123
if let Some(value) = entry {
@@ -204,7 +204,7 @@ where
204204
Ok(existing)
205205
}
206206

207-
pub fn iter(&self) -> Result<ResultIterator<K, V>> {
207+
pub fn iter(&self) -> Result<ResultIterator<'_, K, V>> {
208208
if let Some(c1) = &self.c1 {
209209
if self.c0.is_empty() && self.c2.is_none() {
210210
// Create an iterator that skips the thombstone entries

graphannis/src/annis/db/aql/operators/equal_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl std::fmt::Display for EqualValue<'_> {
7676
}
7777

7878
impl EqualValue<'_> {
79-
fn value_for_match(&self, m: &Match, spec: &NodeSearchSpec) -> Result<Option<Cow<str>>> {
79+
fn value_for_match(&self, m: &Match, spec: &NodeSearchSpec) -> Result<Option<Cow<'_, str>>> {
8080
match spec {
8181
NodeSearchSpec::ExactValue { .. }
8282
| NodeSearchSpec::NotExactValue { .. }

graphannis/src/annis/db/exec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub struct NodeSearchDesc {
196196
}
197197

198198
pub trait ExecutionNode: Iterator {
199-
fn as_nodesearch(&self) -> Option<&NodeSearch> {
199+
fn as_nodesearch(&self) -> Option<&NodeSearch<'_>> {
200200
None
201201
}
202202

@@ -220,7 +220,7 @@ impl Iterator for EmptyResultSet {
220220
}
221221

222222
impl ExecutionNode for EmptyResultSet {
223-
fn as_nodesearch(&self) -> Option<&NodeSearch> {
223+
fn as_nodesearch(&self) -> Option<&NodeSearch<'_>> {
224224
None
225225
}
226226

graphannis/src/annis/db/exec/nodesearch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ impl ExecutionNode for NodeSearch<'_> {
11221122
self.desc.as_ref()
11231123
}
11241124

1125-
fn as_nodesearch(&self) -> Option<&NodeSearch> {
1125+
fn as_nodesearch(&self) -> Option<&NodeSearch<'_>> {
11261126
Some(self)
11271127
}
11281128

0 commit comments

Comments
 (0)