Skip to content

Commit d892e97

Browse files
committed
Make the test and lint workflows faster
1 parent 3c6cb8c commit d892e97

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.github/workflows/lint.yml renamed to .github/workflows/lints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Rust
2424
uses: actions-rust-lang/setup-rust-toolchain@v1
2525
with:
26-
toolchain: stable
26+
toolchain: '1.86.0' # Pinned to project's MSRV
2727

2828
- name: Install Dependencies
2929
run: |

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
# Define the Rust versions to test against
23-
rust-version: [ "1.86.0", "1.87.0", "stable", "beta" ]
23+
rust-version: [ "1.86.0", "stable" ]
2424

2525
steps:
2626
- name: Checkout Repository

src/core/mst.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pub struct MstEdge<W> {
106106
/// A `Result` containing a tuple with:
107107
/// - A vector of MST edges (`MstEdge<W>`).
108108
/// - The total weight of the MST.
109+
///
109110
/// Returns an `Err(GraphinaException)` if the input graph is empty.
110111
///
111112
/// # Example
@@ -205,6 +206,7 @@ where
205206
/// A `Result` containing a tuple with:
206207
/// - A vector of MST edges (`MstEdge<W>`).
207208
/// - The total weight of the MST.
209+
///
208210
/// Returns an `Err(GraphinaException)` if the input graph is empty.
209211
///
210212
/// # Example
@@ -276,6 +278,7 @@ where
276278
/// A `Result` containing a tuple with:
277279
/// - A vector of MST edges (`MstEdge<W>`).
278280
/// - The total weight of the MST.
281+
///
279282
/// Returns an `Err(GraphinaException)` if the input graph is empty.
280283
///
281284
/// # Example

src/core/paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ where
6464
/// A `Result` containing a vector of length equal to the number of nodes, where each element is:
6565
/// - `Some(cost)` if the node is reachable from the source, or
6666
/// - `None` if it is unreachable.
67+
///
6768
/// Returns an `Err(GraphinaException)` if a negative edge weight is found.
6869
///
6970
/// # Complexity

src/core/traversal.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ where
279279

280280
if depth > 0 {
281281
for neighbor in graph.neighbors(current) {
282-
if !visited.contains(&neighbor) {
283-
if dls(graph, neighbor, target, depth - 1, visited, path) {
284-
return true;
285-
}
282+
if !visited.contains(&neighbor)
283+
&& dls(graph, neighbor, target, depth - 1, visited, path)
284+
{
285+
return true;
286286
}
287287
}
288288
}

0 commit comments

Comments
 (0)