Skip to content

Commit 46e87e3

Browse files
committed
Upgrade Rust and fix clippy lints
1 parent a7ac95a commit 46e87e3

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ jobs:
9494
body: 'Thank you for your contribution! 🙏\n\nThe pre-commit checks failed, but this is easy to fix. You\'ll need to run:\n\n```bash\nmake pre-commit\n# or\npre-commit run --all-files\n```\n\nThis will automatically fix most formatting issues. Just commit any changes and push again.\n\nSee our [CONTRIBUTING.md](https://github.com/nautechsystems/nautilus_trader/blob/develop/CONTRIBUTING.md) guide for more details.'
9595
})
9696
97-
- name: Fail job if pre-commit fails
98-
if: failure() # Explicitly fail the job if pre-commit failed
97+
- name: Fail job if pre-commit failed
98+
if: failure()
9999
run: |
100100
echo "Pre-commit checks failed, exiting"
101101
exit 1

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
| Platform | Rust | Python |
1717
| :----------------- | :------ | :----- |
18-
| `Linux (x86_64)` | 1.83.0+ | 3.11+ |
19-
| `macOS (arm64)` | 1.83.0+ | 3.11+ |
20-
| `Windows (x86_64)` | 1.83.0+ | 3.11+ |
18+
| `Linux (x86_64)` | 1.84.0+ | 3.11+ |
19+
| `macOS (arm64)` | 1.84.0+ | 3.11+ |
20+
| `Windows (x86_64)` | 1.84.0+ | 3.11+ |
2121

2222
[![](https://dcbadge.limes.pink/api/server/AUWVs3XaCS)](https://discord.gg/AUWVs3XaCS)
2323

nautilus_core/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ members = [
2323
]
2424

2525
[workspace.package]
26-
rust-version = "1.83.0"
26+
rust-version = "1.84.0"
2727
version = "0.40.0"
2828
edition = "2021"
2929
authors = ["Nautech Systems <[email protected]>"]
@@ -48,7 +48,7 @@ itoa = "1.0.14"
4848
once_cell = "1.20.2"
4949
log = { version = "0.4.22", features = ["std", "kv_unstable", "serde", "release_max_level_debug"] }
5050
parquet = "53.2.0" # Keep in line with datafusion
51-
pyo3 = { version = "0.22.6", features = ["rust_decimal", "indexmap", "smallvec"] }
51+
pyo3 = { version = "0.22.6", features = ["gil-refs", "indexmap", "rust_decimal", "smallvec"] }
5252
pyo3-async-runtimes = { version = "0.22.0", features = ["tokio-runtime", "tokio", "attributes"] }
5353
rand = "0.8.5"
5454
reqwest = { version = "0.12.12", features = ["blocking"] }

nautilus_core/model/src/orderbook/book.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ impl OrderBook {
266266
/// Returns true if the book has any bid orders.
267267
#[must_use]
268268
pub fn has_bid(&self) -> bool {
269-
self.bids.top().map_or(false, |top| !top.orders.is_empty())
269+
self.bids.top().is_some_and(|top| !top.orders.is_empty())
270270
}
271271

272272
/// Returns true if the book has any ask orders.
273273
#[must_use]
274274
pub fn has_ask(&self) -> bool {
275-
self.asks.top().map_or(false, |top| !top.orders.is_empty())
275+
self.asks.top().is_some_and(|top| !top.orders.is_empty())
276276
}
277277

278278
/// Returns the best bid price if available.

nautilus_core/model/src/orders/base.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,8 @@ pub trait Order: 'static + Send {
331331
}
332332

333333
fn is_spawned(&self) -> bool {
334-
self.exec_spawn_id().map_or(false, |exec_spawn_id| {
335-
exec_spawn_id != self.client_order_id()
336-
})
334+
self.exec_spawn_id()
335+
.is_some_and(|exec_spawn_id| exec_spawn_id != self.client_order_id())
337336
}
338337
}
339338

nautilus_core/network/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ extension-module = [
4242
"pyo3/extension-module",
4343
"nautilus-core/extension-module",
4444
]
45+
gil-refs = []
4546
python = ["pyo3", "pyo3-async-runtimes"]
4647
std = []

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
version = "1.83.0"
2+
version = "1.84.0"
33
channel = "stable"

0 commit comments

Comments
 (0)