Skip to content

Commit

Permalink
Upgrade Rust and fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Jan 10, 2025
1 parent a7ac95a commit 46e87e3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ jobs:
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.'
})
- name: Fail job if pre-commit fails
if: failure() # Explicitly fail the job if pre-commit failed
- name: Fail job if pre-commit failed
if: failure()
run: |
echo "Pre-commit checks failed, exiting"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

| Platform | Rust | Python |
| :----------------- | :------ | :----- |
| `Linux (x86_64)` | 1.83.0+ | 3.11+ |
| `macOS (arm64)` | 1.83.0+ | 3.11+ |
| `Windows (x86_64)` | 1.83.0+ | 3.11+ |
| `Linux (x86_64)` | 1.84.0+ | 3.11+ |
| `macOS (arm64)` | 1.84.0+ | 3.11+ |
| `Windows (x86_64)` | 1.84.0+ | 3.11+ |

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

Expand Down
4 changes: 2 additions & 2 deletions nautilus_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
]

[workspace.package]
rust-version = "1.83.0"
rust-version = "1.84.0"
version = "0.40.0"
edition = "2021"
authors = ["Nautech Systems <[email protected]>"]
Expand All @@ -48,7 +48,7 @@ itoa = "1.0.14"
once_cell = "1.20.2"
log = { version = "0.4.22", features = ["std", "kv_unstable", "serde", "release_max_level_debug"] }
parquet = "53.2.0" # Keep in line with datafusion
pyo3 = { version = "0.22.6", features = ["rust_decimal", "indexmap", "smallvec"] }
pyo3 = { version = "0.22.6", features = ["gil-refs", "indexmap", "rust_decimal", "smallvec"] }
pyo3-async-runtimes = { version = "0.22.0", features = ["tokio-runtime", "tokio", "attributes"] }
rand = "0.8.5"
reqwest = { version = "0.12.12", features = ["blocking"] }
Expand Down
4 changes: 2 additions & 2 deletions nautilus_core/model/src/orderbook/book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ impl OrderBook {
/// Returns true if the book has any bid orders.
#[must_use]
pub fn has_bid(&self) -> bool {
self.bids.top().map_or(false, |top| !top.orders.is_empty())
self.bids.top().is_some_and(|top| !top.orders.is_empty())
}

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

/// Returns the best bid price if available.
Expand Down
5 changes: 2 additions & 3 deletions nautilus_core/model/src/orders/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,8 @@ pub trait Order: 'static + Send {
}

fn is_spawned(&self) -> bool {
self.exec_spawn_id().map_or(false, |exec_spawn_id| {
exec_spawn_id != self.client_order_id()
})
self.exec_spawn_id()
.is_some_and(|exec_spawn_id| exec_spawn_id != self.client_order_id())
}
}

Expand Down
1 change: 1 addition & 0 deletions nautilus_core/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ extension-module = [
"pyo3/extension-module",
"nautilus-core/extension-module",
]
gil-refs = []
python = ["pyo3", "pyo3-async-runtimes"]
std = []
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
version = "1.83.0"
version = "1.84.0"
channel = "stable"

0 comments on commit 46e87e3

Please sign in to comment.