Skip to content

Commit 810bb16

Browse files
authored
Merge pull request #215 from Peter554/rust-2024-edition
Rust 2024 edition
2 parents 89c661c + f18aaf3 commit 810bb16

11 files changed

Lines changed: 74 additions & 71 deletions

rust/Cargo.lock

Lines changed: 59 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "_rustgrimp"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[lib]
77
name = "_rustgrimp"

rust/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::exceptions::{InvalidModuleExpression, ModuleNotPresent, NoSuchContainer};
2-
use pyo3::exceptions::PyValueError;
32
use pyo3::PyErr;
3+
use pyo3::exceptions::PyValueError;
44
use thiserror::Error;
55

66
#[derive(Debug, Error)]

rust/src/graph/direct_import_queries.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::errors::{GrimpError, GrimpResult};
22
use crate::graph::{
3-
ExtendWithDescendants, Graph, ImportDetails, ModuleToken, EMPTY_IMPORT_DETAILS,
4-
EMPTY_MODULE_TOKENS, MODULE_NAMES,
3+
EMPTY_IMPORT_DETAILS, EMPTY_MODULE_TOKENS, ExtendWithDescendants, Graph, ImportDetails,
4+
MODULE_NAMES, ModuleToken,
55
};
66
use crate::module_expressions::ModuleExpression;
77
use rustc_hash::FxHashSet;

rust/src/graph/graph_manipulation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::graph::{
2-
Graph, ImportDetails, Module, ModuleIterator, ModuleToken, IMPORT_LINE_CONTENTS, MODULE_NAMES,
2+
Graph, IMPORT_LINE_CONTENTS, ImportDetails, MODULE_NAMES, Module, ModuleIterator, ModuleToken,
33
};
44
use rustc_hash::FxHashSet;
55
use slotmap::secondary::Entry;

rust/src/graph/hierarchy_queries.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::graph::{Graph, Module, ModuleIterator, ModuleToken, MODULE_NAMES};
1+
use crate::graph::{Graph, MODULE_NAMES, Module, ModuleIterator, ModuleToken};
22
use crate::module_expressions::ModuleExpression;
33
use rustc_hash::FxHashSet;
44

@@ -50,7 +50,10 @@ impl Graph {
5050
descendants.into_iter()
5151
}
5252

53-
pub fn find_matching_modules(&self, expression: &ModuleExpression) -> impl ModuleIterator {
53+
pub fn find_matching_modules(
54+
&self,
55+
expression: &ModuleExpression,
56+
) -> impl ModuleIterator + use<'_> {
5457
let interner = MODULE_NAMES.read().unwrap();
5558
let modules: FxHashSet<_> = self
5659
.modules

rust/src/graph/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use derive_new::new;
33
use getset::{CopyGetters, Getters};
44
use lazy_static::lazy_static;
55
use rustc_hash::{FxHashMap, FxHashSet};
6-
use slotmap::{new_key_type, SecondaryMap, SlotMap};
6+
use slotmap::{SecondaryMap, SlotMap, new_key_type};
77
use std::sync::RwLock;
88
use string_interner::backend::StringBackend;
99
use string_interner::{DefaultSymbol, StringInterner};

rust/src/graph/pathfinding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::errors::{GrimpError, GrimpResult};
2-
use crate::graph::{Graph, ModuleToken, EMPTY_MODULE_TOKENS};
2+
use crate::graph::{EMPTY_MODULE_TOKENS, Graph, ModuleToken};
33
use indexmap::{IndexMap, IndexSet};
44
use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
55
use slotmap::SecondaryMap;

0 commit comments

Comments
 (0)