Files
foxhunt/docs/archive/build_logs/final_clippy_ml.txt
jgrusewski e393a8af89 chore(cleanup): Cleanup Wave 3 - Archive reports, organize docs, fix security issues
## Summary
Third major cleanup wave after investigating 287 remaining root files.
Archived historical reports, organized documentation, removed regeneratable
artifacts, and fixed critical security issue.

## Files Cleaned (119 total)
- Archived: 78 files (7 WAVE reports + 71 summaries) → docs/archive/
- Archived: 7 build logs → docs/archive/build_logs/
- Organized: 10 markdown files → docs/guides/ + docs/checklists/
- Deleted: 17 test/coverage artifacts (regeneratable)
- Deleted: 7 empty/obsolete files (docker override, clippy baselines)
- Deleted: 3 large files (119MB - .venv, ppo_hyperopt_output.txt, backup)

## Space Recovered
- Total: ~120.7 MB
- Large files: 119.25 MB (.venv, ppo_hyperopt_output.txt)
- Archives: 1.04 MB (summaries + build logs)
- Test artifacts: 980 KB

## Security Fix (CRITICAL)
- Fixed: certs/security.env removed from git tracking (contained JWT secrets)
- Updated: .gitignore to prevent future tracking of sensitive cert files
- Removed: 4 files from git history (security.env, production.env.template, *.serial)

## Documentation Organization
- Created: docs/archive/ (wave_reports/, summaries/, build_logs/)
- Created: docs/guides/ (7 detailed implementation guides)
- Created: docs/checklists/ (3 operational checklists)
- Retained: 30 essential .md files in root (quick refs, CLAUDE.md)

## Investigation Reports Created
- MARKDOWN_ORGANIZATION_REPORT.md
- TXT_FILES_INVENTORY_AND_ARCHIVAL_PLAN.md
- ROOT_CONFIG_FILES_ANALYSIS_REPORT.md
- DOCKER_ROOT_FILES_ANALYSIS.md
- DATABASE_INITIALIZATION_AND_SETUP_ANALYSIS.md
- (6 additional investigation/index files)

## Cleanup Wave Progress
- Wave 1: 899 files deleted (1,071,884 lines)
- Wave 2: 543 files archived/deleted (~34GB)
- Wave 3: 119 files archived/deleted/organized (~121MB)
- Total: 1,561 files cleaned, ~35.1GB space recovered

## Result
Root directory: 287 files → ~180 files (excluding investigation reports)
Clean, organized, production-ready structure maintained.

Related: Second cleanup wave (previous commit)
2025-10-30 01:46:39 +01:00

6783 lines
295 KiB
Plaintext

Blocking waiting for file lock on build directory
Checking config v1.0.0 (/home/jgrusewski/Work/foxhunt/config)
Compiling ml v1.0.0 (/home/jgrusewski/Work/foxhunt/ml)
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.85.0` from `clippy.toml`
warning: `config` (lib) generated 1 warning
Checking common v1.0.0 (/home/jgrusewski/Work/foxhunt/common)
Checking trading_engine v1.0.0 (/home/jgrusewski/Work/foxhunt/trading_engine)
Checking storage v1.0.0 (/home/jgrusewski/Work/foxhunt/storage)
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:823:17
|
823 | MarketEvent::Quote { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
824 | MarketEvent::Trade { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
825 | MarketEvent::OrderBook { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
826 | MarketEvent::OrderBookUpdate { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
827 | MarketEvent::Bar { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
828 | MarketEvent::Control { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
829 | MarketEvent::Sentiment { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
= note: `-D clippy::match-same-arms` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::match_same_arms)]`
help: otherwise merge the patterns into a single arm
|
823 - MarketEvent::Quote { timestamp, .. } => Some(*timestamp),
824 - MarketEvent::Trade { timestamp, .. } => Some(*timestamp),
823 + MarketEvent::Quote { timestamp, .. } | MarketEvent::Trade { timestamp, .. } | MarketEvent::OrderBook { timestamp, .. } | MarketEvent::OrderBookUpdate { timestamp, .. } | MarketEvent::Bar { timestamp, .. } | MarketEvent::Control { timestamp, .. } | MarketEvent::Sentiment { timestamp, .. } => Some(*timestamp),
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:834:17
|
834 | SystemEvent::Heartbeat { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
835 | SystemEvent::Progress { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
836 | SystemEvent::Error { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
837 | SystemEvent::ServiceStarted { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
838 | SystemEvent::ServiceStopped { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
834 - SystemEvent::Heartbeat { timestamp, .. } => Some(*timestamp),
835 - SystemEvent::Progress { timestamp, .. } => Some(*timestamp),
834 + SystemEvent::Heartbeat { timestamp, .. } | SystemEvent::Progress { timestamp, .. } | SystemEvent::Error { timestamp, .. } | SystemEvent::ServiceStarted { timestamp, .. } | SystemEvent::ServiceStopped { timestamp, .. } => Some(*timestamp),
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:841:17
|
841 | RiskEvent::PositionLimitBreach { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
842 | RiskEvent::DrawdownAlert { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
843 | RiskEvent::ExposureLimitBreach { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
844 | RiskEvent::MarginCall { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
841 - RiskEvent::PositionLimitBreach { timestamp, .. } => Some(*timestamp),
842 - RiskEvent::DrawdownAlert { timestamp, .. } => Some(*timestamp),
841 + RiskEvent::PositionLimitBreach { timestamp, .. } | RiskEvent::DrawdownAlert { timestamp, .. } | RiskEvent::ExposureLimitBreach { timestamp, .. } | RiskEvent::MarginCall { timestamp, .. } => Some(*timestamp),
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:847:17
|
847 | PositionEvent::PositionOpened { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
848 | PositionEvent::PositionUpdated { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
849 | PositionEvent::PositionClosed { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
850 | PositionEvent::PositionReconciled { timestamp, .. } => Some(*timestamp),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
847 - PositionEvent::PositionOpened { timestamp, .. } => Some(*timestamp),
848 - PositionEvent::PositionUpdated { timestamp, .. } => Some(*timestamp),
847 + PositionEvent::PositionOpened { timestamp, .. } | PositionEvent::PositionUpdated { timestamp, .. } | PositionEvent::PositionClosed { timestamp, .. } | PositionEvent::PositionReconciled { timestamp, .. } => Some(*timestamp),
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:860:17
|
860 | MarketEvent::Quote { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
861 | MarketEvent::Trade { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
862 | MarketEvent::OrderBook { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
863 | MarketEvent::OrderBookUpdate { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
864 | MarketEvent::Bar { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
860 - MarketEvent::Quote { symbol, .. } => Some(symbol),
861 - MarketEvent::Trade { symbol, .. } => Some(symbol),
860 + MarketEvent::Quote { symbol, .. } | MarketEvent::Trade { symbol, .. } | MarketEvent::OrderBook { symbol, .. } | MarketEvent::OrderBookUpdate { symbol, .. } | MarketEvent::Bar { symbol, .. } => Some(symbol),
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:865:17
|
865 | MarketEvent::Control { .. } => None, // Control events don't have specific symbols
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
866 | MarketEvent::Sentiment { .. } => None, // Multiple symbols possible
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
865 ~ MarketEvent::Control { .. } | MarketEvent::Sentiment { .. } => None, // Control events don't have specific symbols
866 ~ // Multiple symbols possible
|
error: these match arms have identical bodies
--> trading_engine/src/types/events.rs:877:17
|
877 | PositionEvent::PositionOpened { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
878 | PositionEvent::PositionUpdated { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
879 | PositionEvent::PositionClosed { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
880 | PositionEvent::PositionReconciled { symbol, .. } => Some(symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is unintentional make the arms return different values
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms
help: otherwise merge the patterns into a single arm
|
877 - PositionEvent::PositionOpened { symbol, .. } => Some(symbol),
878 - PositionEvent::PositionUpdated { symbol, .. } => Some(symbol),
877 + PositionEvent::PositionOpened { symbol, .. } | PositionEvent::PositionUpdated { symbol, .. } | PositionEvent::PositionClosed { symbol, .. } | PositionEvent::PositionReconciled { symbol, .. } => Some(symbol),
|
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:131:5
|
131 | /// HardwareTimestamp
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
= note: `-D clippy::doc-markdown` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]`
help: try
|
131 - /// HardwareTimestamp
131 + /// `HardwareTimestamp`
|
error: you are deriving `serde::Deserialize` on a type that has methods using `unsafe`
--> trading_engine/src/timing.rs:130:48
|
130 | #[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize)]
| ^^^^^^^^^^^^^^^^^^
|
= help: consider implementing `serde::Deserialize` manually. See https://serde.rs/impl-deserialize.html
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_derive_deserialize
= note: `-D clippy::unsafe-derive-deserialize` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unsafe_derive_deserialize)]`
= note: this error originates in the derive macro `serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:147:5
|
147 | /// TimingSource
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
147 - /// TimingSource
147 + /// `TimingSource`
|
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:166:5
|
166 | /// TimingSafetyConfig
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
166 - /// TimingSafetyConfig
166 + /// `TimingSafetyConfig`
|
error: you have declared `#[inline(always)]` on `now`. This is usually a bad idea
--> trading_engine/src/timing.rs:196:5
|
196 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
= note: `-D clippy::inline-always` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::inline_always)]`
error: use Option::map_or_else instead of an if let/else
--> trading_engine/src/timing.rs:219:13
|
219 | / match Self::rdtsc_with_validation() {
220 | | Ok(timestamp) => timestamp,
221 | | Err(_) => Self::fallback_system_clock(),
222 | | }
| |_____________^ help: try: `Self::rdtsc_with_validation().map_or_else(Self::fallback_system_clock, |timestamp| timestamp)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-D clippy::option-if-let-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_if_let_else)]`
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:282:35
|
282 | let cycles_u128 = cycles as u128;
| ^^^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: `-D clippy::cast-lossless` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::cast_lossless)]`
help: use `u128::from` instead
|
282 - let cycles_u128 = cycles as u128;
282 + let cycles_u128 = u128::from(cycles);
|
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:283:69
|
283 | let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / freq as u128;
| ^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
help: use `u128::from` instead
|
283 - let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / freq as u128;
283 + let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / u128::from(freq);
|
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:286:33
|
286 | if nanos_u128 > u64::MAX as u128 {
| ^^^^^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
help: use `u128::from` instead
|
286 - if nanos_u128 > u64::MAX as u128 {
286 + if nanos_u128 > u128::from(u64::MAX) {
|
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:368:35
|
368 | let cycles_u128 = cycles2 as u128;
| ^^^^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
help: use `u128::from` instead
|
368 - let cycles_u128 = cycles2 as u128;
368 + let cycles_u128 = u128::from(cycles2);
|
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:369:69
|
369 | let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / freq as u128;
| ^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
help: use `u128::from` instead
|
369 - let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / freq as u128;
369 + let nanos_u128 = cycles_u128 * 1_000_000_000_u128 / u128::from(freq);
|
error: casts from `u64` to `u128` can be expressed infallibly using `From`
--> trading_engine/src/timing.rs:371:33
|
371 | if nanos_u128 > u64::MAX as u128 {
| ^^^^^^^^^^^^^^^^
|
= help: an `as` cast can become silently lossy if the types change in the future
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
help: use `u128::from` instead
|
371 - if nanos_u128 > u64::MAX as u128 {
371 + if nanos_u128 > u128::from(u64::MAX) {
|
error: variables can be used directly in the `format!` string
--> trading_engine/src/timing.rs:372:32
|
372 | return Err(anyhow!(
| ________________________________^
373 | | "TSC calculation overflow: cycles={}, freq={}, result={}",
374 | | cycles2,
375 | | freq,
376 | | nanos_u128
377 | | ));
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-D clippy::uninlined-format-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
error: you have declared `#[inline(always)]` on `latency_ns`. This is usually a bad idea
--> trading_engine/src/timing.rs:408:5
|
408 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/timing.rs:418:5
|
418 | pub fn latency_ns_safe(&self, earlier: &Self) -> Result<u64> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: `-D clippy::missing-errors-doc` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_errors_doc)]`
error: you have declared `#[inline(always)]` on `latency_us`. This is usually a bad idea
--> trading_engine/src/timing.rs:451:5
|
451 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: called `map(<f>).unwrap_or_else(<g>)` on a `Result` value
--> trading_engine/src/timing.rs:454:9
|
454 | / self.latency_ns_safe(earlier)
455 | | .map(|ns| {
456 | | #[allow(clippy::cast_precision_loss)]
... |
463 | | 0.0
464 | | })
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
= note: `-D clippy::map-unwrap-or` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::map_unwrap_or)]`
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/timing.rs:468:5
|
468 | pub fn latency_us_safe(&self, earlier: &Self) -> Result<f64> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `as_nanos`. This is usually a bad idea
--> trading_engine/src/timing.rs:477:5
|
477 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `from_nanos`. This is usually a bad idea
--> trading_engine/src/timing.rs:484:5
|
484 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/timing.rs:497:5
|
497 | pub fn duration_since(&self, earlier: &Self) -> Result<u64> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `duration_since`. This is usually a bad idea
--> trading_engine/src/timing.rs:496:5
|
496 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:511:30
|
511 | /// - Rate limiting prevents DoS via repeated calibration
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
511 - /// - Rate limiting prevents DoS via repeated calibration
511 + /// - Rate limiting prevents `DoS` via repeated calibration
|
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/timing.rs:523:1
|
523 | pub fn calibrate_tsc() -> Result<u64, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/timing.rs:545:1
|
545 | pub fn calibrate_tsc_with_config(config: &TimingSafetyConfig) -> Result<u64, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: the function has a cognitive complexity of (31/30)
--> trading_engine/src/timing.rs:545:8
|
545 | pub fn calibrate_tsc_with_config(config: &TimingSafetyConfig) -> Result<u64, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
= note: `-D clippy::cognitive-complexity` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::cognitive_complexity)]`
error: adding items after statements is confusing, since items exist from the start of the scope
--> trading_engine/src/timing.rs:555:5
|
555 | const ATTEMPTS: usize = 5;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
= note: `-D clippy::items-after-statements` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::items_after_statements)]`
error: casting `u64` to `i64` may wrap around the value
--> trading_engine/src/timing.rs:582:27
|
582 | .filter(|&&freq| (freq as i64 - *median_freq as i64).abs() <= max_deviation as i64)
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
= note: `-D clippy::cast-possible-wrap` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::cast_possible_wrap)]`
error: casting `u64` to `i64` may wrap around the value
--> trading_engine/src/timing.rs:582:41
|
582 | .filter(|&&freq| (freq as i64 - *median_freq as i64).abs() <= max_deviation as i64)
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
error: casting `u64` to `i64` may wrap around the value
--> trading_engine/src/timing.rs:582:71
|
582 | .filter(|&&freq| (freq as i64 - *median_freq as i64).abs() <= max_deviation as i64)
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:639:69
|
639 | /// - Could be called repeatedly to consume `CPU` cycles and create DoS
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
639 - /// - Could be called repeatedly to consume `CPU` cycles and create DoS
639 + /// - Could be called repeatedly to consume `CPU` cycles and create `DoS`
|
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:737:5
|
737 | /// LatencyMeasurement
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
737 - /// LatencyMeasurement
737 + /// `LatencyMeasurement`
|
error: you have declared `#[inline(always)]` on `start`. This is usually a bad idea
--> trading_engine/src/timing.rs:748:5
|
748 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `finish`. This is usually a bad idea
--> trading_engine/src/timing.rs:757:5
|
757 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: called `map(<f>).unwrap_or_else(<g>)` on an `Option` value
--> trading_engine/src/timing.rs:760:9
|
760 | / self.end
761 | | .as_ref()
762 | | .map(|end| end.latency_ns(&self.start))
763 | | .unwrap_or_else(|| {
764 | | tracing::warn!("Failed to capture end timestamp, returning 0 latency");
765 | | 0
766 | | })
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
error: you have declared `#[inline(always)]` on `finish_us`. This is usually a bad idea
--> trading_engine/src/timing.rs:769:5
|
769 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:780:5
|
780 | /// HftLatencyTracker
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
780 - /// HftLatencyTracker
780 + /// `HftLatencyTracker`
|
error: item in documentation is missing backticks
--> trading_engine/src/timing.rs:831:5
|
831 | /// LatencyStats
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
831 - /// LatencyStats
831 + /// `LatencyStats`
|
error: you have declared `#[inline(always)]` on `prefetch_read`. This is usually a bad idea
--> trading_engine/src/simd/mod.rs:285:5
|
285 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `prefetch_write`. This is usually a bad idea
--> trading_engine/src/simd/mod.rs:298:5
|
298 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `prefetch_range`. This is usually a bad idea
--> trading_engine/src/simd/mod.rs:311:5
|
311 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: more than 3 bools in a struct
--> trading_engine/src/simd/mod.rs:325:1
|
325 | / pub struct CpuFeatures {
326 | | /// Avx2
327 | | pub avx2: bool,
328 | | /// Sse2
... |
335 | | pub fma: bool,
336 | | }
| |_^
|
= help: consider using a state machine or refactoring bools into two-variant enums
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools
= note: `-D clippy::struct-excessive-bools` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::struct_excessive_bools)]`
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:355:5
|
355 | pub fn require_avx2(&self) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:367:5
|
367 | pub fn require_sse2(&self) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:456:5
|
456 | pub fn create_price_ops(&self) -> Result<SimdPriceOps, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:463:5
|
463 | pub fn create_risk_engine(&self) -> Result<SimdRiskEngine, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:470:5
|
470 | pub fn create_market_data_ops(&self) -> Result<SimdMarketDataOps, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/simd/mod.rs:477:5
|
477 | pub fn create_sse2_price_ops(&self) -> Result<Sse2PriceOps, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: use Option::map_or instead of an if let/else
--> trading_engine/src/simd/mod.rs:487:32
|
487 | SimdLevel::AVX2 => match self.create_price_ops() {
| ________________________________^
488 | | Ok(ops) => AdaptivePriceOps::AVX2(ops),
489 | | Err(_) => AdaptivePriceOps::Scalar,
490 | | },
| |_____________^ help: try: `self.create_price_ops().map_or(AdaptivePriceOps::Scalar, |ops| AdaptivePriceOps::AVX2(ops))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
error: use Option::map_or instead of an if let/else
--> trading_engine/src/simd/mod.rs:492:17
|
492 | / match self.create_sse2_price_ops() {
493 | | Ok(ops) => AdaptivePriceOps::SSE2(ops),
494 | | Err(_) => AdaptivePriceOps::Scalar,
495 | | }
| |_________________^ help: try: `self.create_sse2_price_ops().map_or(AdaptivePriceOps::Scalar, |ops| AdaptivePriceOps::SSE2(ops))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:694:5
|
694 | pub unsafe fn simd_binary_search(&self, sorted_prices: &[f64], target: f64) -> Option<usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
error: this method could have a `#[must_use]` attribute
--> trading_engine/src/simd/mod.rs:830:5
|
830 | pub unsafe fn sum_aligned(&self, prices: &AlignedPrices) -> f64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub unsafe fn sum_aligned(&self, prices: &AlignedPrices) -> f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
= note: `-D clippy::must-use-candidate` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::must_use_candidate)]`
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1106:5
|
1106 | / pub unsafe fn calculate_correlation_matrix(
1107 | | &self,
1108 | | returns: &[Vec<f64>], // returns[asset][time]
1109 | | correlations: &mut [f64], // Flattened correlation matrix
1110 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1213:5
|
1213 | / pub unsafe fn calculate_expected_shortfall(
1214 | | &self,
1215 | | returns: &[f64],
1216 | | confidence_level: f64,
1217 | | ) -> f64 {
| |____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: use Option::map_or_else instead of an if let/else
--> trading_engine/src/simd/mod.rs:1226:13
|
1226 | / match a.partial_cmp(b) {
1227 | | Some(ordering) => ordering,
1228 | | None => {
... |
1237 | | },
1238 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
1226 ~ a.partial_cmp(b).map_or_else(|| if a.is_nan() && b.is_nan() {
1227 + Ordering::Equal
1228 + } else if a.is_nan() {
1229 + Ordering::Less // NaN is "worse" (comes first)
1230 + } else {
1231 + Ordering::Greater
1232 + }, |ordering| ordering)
|
error: the loop variable `j` is only used to index `sorted_returns`
--> trading_engine/src/simd/mod.rs:1262:18
|
1262 | for j in i..var_index {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `-D clippy::needless-range-loop` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_range_loop)]`
help: consider using an iterator
|
1262 - for j in i..var_index {
1262 + for <item> in sorted_returns.iter().take(var_index).skip(i) {
|
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1412:5
|
1412 | / pub unsafe fn calculate_multi_period_sma(
1413 | | &self,
1414 | | prices: &[f64],
1415 | | periods: &[usize; 4], // Calculate 4 different SMAs simultaneously
1416 | | results: &mut [Vec<f64>; 4],
1417 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: the loop variable `k` is only used to index `prices`
--> trading_engine/src/simd/mod.rs:1460:34
|
1460 | for k in j..=start_idx {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
1460 - for k in j..=start_idx {
1460 + for <item> in prices.iter().take(start_idx + 1).skip(j) {
|
error: the loop variable `k` is only used to index `prices`
--> trading_engine/src/simd/mod.rs:1465:34
|
1465 | for k in window_start..=start_idx {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
1465 - for k in window_start..=start_idx {
1465 + for <item> in prices.iter().take(start_idx + 1).skip(window_start) {
|
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1479:5
|
1479 | / pub unsafe fn detect_price_anomalies(
1480 | | &self,
1481 | | prices: &[f64],
1482 | | threshold_std_devs: f64,
1483 | | anomalies: &mut Vec<usize>,
1484 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: the loop variable `j` is only used to index `prices`
--> trading_engine/src/simd/mod.rs:1505:18
|
1505 | for j in i..prices.len() {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
1505 - for j in i..prices.len() {
1505 + for <item> in prices.iter().skip(i) {
|
error: the loop variable `j` is only used to index `prices`
--> trading_engine/src/simd/mod.rs:1527:18
|
1527 | for j in i..prices.len() {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
1527 - for j in i..prices.len() {
1527 + for <item> in prices.iter().skip(i) {
|
error: the loop variable `j` is used to index `prices`
--> trading_engine/src/simd/mod.rs:1563:18
|
1563 | for j in i..prices.len() {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
1563 - for j in i..prices.len() {
1563 + for (j, <item>) in prices.iter().enumerate().skip(i) {
|
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1627:5
|
1627 | pub unsafe fn batch_min_prices_sse2(&self, prices: &[f64], results: &mut [f64]) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: unsafe function's docs are missing a `# Safety` section
--> trading_engine/src/simd/mod.rs:1665:5
|
1665 | pub unsafe fn calculate_vwap_sse2(&self, prices: &[f64], volumes: &[f64]) -> f64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/simd/performance_test.rs:136:13
|
136 | let _ = scalar_vwap(&prices, &volumes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
= note: requested on the command line with `-D clippy::let-underscore-must-use`
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/simd/performance_test.rs:153:13
|
153 | let _ = scalar_vwap(&prices, &volumes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/simd/performance_test.rs:193:13
|
193 | let _ = scalar_vwap(&prices, &volumes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/simd/performance_test.rs:210:13
|
210 | let _ = scalar_vwap(&prices, &volumes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:37:5
|
37 | /// CpuTopology
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
37 - /// CpuTopology
37 + /// `CpuTopology`
|
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:73:5
|
73 | /// MemoryPolicy
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
73 - /// MemoryPolicy
73 + /// `MemoryPolicy`
|
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:89:5
|
89 | /// CpuAffinityManager
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
89 - /// CpuAffinityManager
89 + /// `CpuAffinityManager`
|
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:110:9
|
110 | /// - `Ok`(CpuAffinityManager)` - Successfully initialized manager
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:111:9
|
111 | /// - `Err`(&'static str)` - Error message if topology detection fails
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:114:9
|
114 | /// ``no_run
| _________^
115 | | /// use core::affinity::CpuAffinityManager;
| |_______________________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:117:23
|
117 | /// let manager = CpuAffinityManager::new()?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
117 - /// let manager = CpuAffinityManager::new()?;
117 + /// let manager = `CpuAffinityManager::new()`?;
|
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:118:48
|
118 | /// println!("Detected {} isolated cores", manager.isolated_cores.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
118 - /// println!("Detected {} isolated cores", manager.isolated_cores.len());
118 + /// println!("Detected {} isolated cores", `manager.isolated_cores.len()`);
|
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:120:9
|
120 | /// ``
| ^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:121:5
|
121 | pub fn new() -> Result<Self, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:139:9
|
139 | /// - `Ok`(CpuTopology)` - Detected `CPU` topology information
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:140:9
|
140 | /// - `Err`(&'static str)` - Error message if detection fails
| _________^
141 | | /// Detect enhanced `CPU` topology with `NUMA` and cache awareness
| |______________________________________________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:156:9
|
156 | /// - `Ok`(CpuTopology)` - Complete topology information
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:157:9
|
157 | /// - `Err`(&'static str)` - Error if system files cannot be read
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/affinity.rs:162:5
|
162 | fn detect_linux_topology() -> Result<CpuTopology, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
= note: `-D clippy::unnecessary-wraps` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_wraps)]`
help: remove `Result` from the return type...
|
162 - fn detect_linux_topology() -> Result<CpuTopology, &'static str> {
162 + fn detect_linux_topology() -> affinity::CpuTopology {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
248 - Ok(topology)
248 + topology
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
--> trading_engine/src/affinity.rs:188:13
|
188 | / for entry in entries {
189 | | if let Ok(entry) = entry {
190 | | let name = entry.file_name();
191 | | if let Some(name_str) = name.to_str() {
... |
206 | | }
| |_____________^
|
help: try `.flatten()` and remove the `if let` statement in the for loop
--> trading_engine/src/affinity.rs:189:17
|
189 | / if let Ok(entry) = entry {
190 | | let name = entry.file_name();
191 | | if let Some(name_str) = name.to_str() {
192 | | if name_str.starts_with("node") {
... |
205 | | }
| |_________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
= note: `-D clippy::manual-flatten` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_flatten)]`
help: try
|
188 ~ for entry in entries.flatten() {
189 + let name = entry.file_name();
190 + if let Some(name_str) = name.to_str() {
191 + if name_str.starts_with("node") {
192 + if let Ok(node_id) = name_str[4..].parse::<usize>() {
193 + numa_nodes = numa_nodes.max(node_id + 1);
194 +
195 + // Read CPUs for this node
196 + let cpulist_path = entry.path().join("cpulist");
197 + if let Ok(cpulist) = fs::read_to_string(cpulist_path) {
198 + let cores = Self::parse_cpu_list(cpulist.trim());
199 + numa_mapping.insert(node_id, cores);
200 + }
201 + }
202 + }
203 + }
204 + }
|
error: stripping a prefix manually
--> trading_engine/src/affinity.rs:193:50
|
193 | ... if let Ok(node_id) = name_str[4..].parse::<usize>() {
| ^^^^^^^^^^^^^
|
note: the prefix was tested here
--> trading_engine/src/affinity.rs:192:25
|
192 | if name_str.starts_with("node") {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
= note: `-D clippy::manual-strip` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_strip)]`
help: try using the `strip_prefix` method
|
192 ~ if let Some(<stripped>) = name_str.strip_prefix("node") {
193 ~ if let Ok(node_id) = <stripped>.parse::<usize>() {
|
error: indexing into a string may panic if the index is within a UTF-8 character
--> trading_engine/src/affinity.rs:193:50
|
193 | ... if let Ok(node_id) = name_str[4..].parse::<usize>() {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_slice
= note: requested on the command line with `-D clippy::string-slice`
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
--> trading_engine/src/affinity.rs:217:13
|
217 | / for entry in entries {
218 | | if let Ok(entry) = entry {
219 | | let name = entry.file_name();
220 | | if let Some(name_str) = name.to_str() {
... |
241 | | }
| |_____________^
|
help: try `.flatten()` and remove the `if let` statement in the for loop
--> trading_engine/src/affinity.rs:218:17
|
218 | / if let Ok(entry) = entry {
219 | | let name = entry.file_name();
220 | | if let Some(name_str) = name.to_str() {
221 | | if name_str.starts_with("cpu")
... |
240 | | }
| |_________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
help: try
|
217 ~ for entry in entries.flatten() {
218 + let name = entry.file_name();
219 + if let Some(name_str) = name.to_str() {
220 + if name_str.starts_with("cpu")
221 + && name_str[3..].chars().all(|c| c.is_ascii_digit())
222 + {
223 + if let Ok(cpu_id) = name_str[3..].parse::<usize>() {
224 + let scaling_path = entry.path().join("cpufreq/scaling_max_freq");
225 + if let Ok(max_freq) = fs::read_to_string(scaling_path) {
226 + if let Ok(freq) = max_freq.trim().parse::<u64>() {
227 + // Heuristic: higher max frequency = performance core
228 + if freq > 3_000_000 {
229 + // 3GHz threshold
230 + perf_cores.push(cpu_id);
231 + } else {
232 + eff_cores.push(cpu_id);
233 + }
234 + }
235 + }
236 + }
237 + }
238 + }
239 + }
|
error: indexing into a string may panic if the index is within a UTF-8 character
--> trading_engine/src/affinity.rs:222:32
|
222 | ... && name_str[3..].chars().all(|c| c.is_ascii_digit())
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_slice
error: indexing into a string may panic if the index is within a UTF-8 character
--> trading_engine/src/affinity.rs:224:49
|
224 | ... if let Ok(cpu_id) = name_str[3..].parse::<usize>() {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_slice
error: indexing may panic
--> trading_engine/src/affinity.rs:260:26
|
260 | (range[0].parse::<usize>(), range[1].parse::<usize>())
| ^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
note: the lint level is defined here
--> trading_engine/src/affinity.rs:14:5
|
14 | clippy::indexing_slicing
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: indexing may panic
--> trading_engine/src/affinity.rs:260:53
|
260 | (range[0].parse::<usize>(), range[1].parse::<usize>())
| ^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:285:9
|
285 | /// - `Ok`(Vec<usize>)` - List of isolated core IDs suitable for `HFT`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:286:9
|
286 | /// - `Err`(&'static str)` - Error if `/proc/cmdline` cannot be read
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: use of `File::read_to_string`
--> trading_engine/src/affinity.rs:297:20
|
297 | if file.read_to_string(&mut cmdline).is_err() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `fs::read_to_string` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#verbose_file_reads
= note: requested on the command line with `-D clippy::verbose-file-reads`
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:358:59
|
358 | /// - `core_id` - `CPU` core ID to pin to (must be in isolated_cores)
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
358 - /// - `core_id` - `CPU` core ID to pin to (must be in isolated_cores)
358 + /// - `core_id` - `CPU` core ID to pin to (must be in `isolated_cores`)
|
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:361:9
|
361 | /// - `Ok`(())` - Thread successfully pinned to core
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:362:9
|
362 | /// - `Err`(&'static str)` - Error if core is not isolated or pinning fails
| _________^
363 | | /// Pin current thread to specific `CPU` core
| |_________________________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:364:5
|
364 | pub fn pin_to_core(&mut self, service_name: &str, core_id: usize) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: use of `println!`
--> trading_engine/src/affinity.rs:373:9
|
373 | println!("HFT Service '{service_name}' pinned to CPU core {core_id}");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
= note: `-D clippy::print-stdout` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::print_stdout)]`
error: unused `self` argument
--> trading_engine/src/affinity.rs:389:25
|
389 | fn set_cpu_affinity(&self, core_id: usize) -> Result<(), &'static str> {
| ^^^^^
|
= help: consider refactoring to an associated function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
= note: `-D clippy::unused-self` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unused_self)]`
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:417:9
|
417 | /// - `Ok`(HftCoreAssignment)` - Core assignments for each service
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:418:9
|
418 | /// - `Err`(&'static str)` - Error if insufficient isolated cores available
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: doc list item without indentation
--> trading_engine/src/affinity.rs:425:9
|
425 | /// Auto-assign cores to `HFT` services based on priority
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
|
425 | /// Auto-assign cores to `HFT` services based on priority
| +++
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:426:5
|
426 | pub fn auto_assign_hft_services(&mut self) -> Result<HftCoreAssignment, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: use of `println!`
--> trading_engine/src/affinity.rs:447:9
|
447 | println!("HFT Core Assignment:");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/affinity.rs:448:9
|
448 | println!(" Trading Engine: CPU {}", assignment.trading_engine);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/affinity.rs:449:9
|
449 | println!(" Risk Management: CPU {}", assignment.risk_management);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/affinity.rs:450:9
|
450 | println!(" Market Data: CPU {}", assignment.market_data);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/affinity.rs:452:13
|
452 | println!(" Spare Core: CPU {spare}");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:468:9
|
468 | /// - `Ok`(())` - Scheduling policy set successfully
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: doc list item without indentation
--> trading_engine/src/affinity.rs:470:9
|
470 | /// Set process scheduling policy to real-time
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
470 | /// Set process scheduling policy to real-time
| ++
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:469:9
|
469 | /// - `Err`(&'static str)` - Error if system call fails
| _________^
470 | | /// Set process scheduling policy to real-time
| |__________________________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:471:5
|
471 | pub fn set_realtime_priority(&self, priority: i32) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: use of `println!`
--> trading_engine/src/affinity.rs:484:9
|
484 | println!("Process set to SCHED_FIFO with priority {priority}");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:494:9
|
494 | /// - `Ok`(())` - Memory successfully locked
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: doc list item without indentation
--> trading_engine/src/affinity.rs:496:9
|
496 | /// Enable memory locking to prevent swapping
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
496 | /// Enable memory locking to prevent swapping
| ++
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:495:9
|
495 | /// - `Err`(&'static str)` - Error if memory locking fails
| _________^
496 | | /// Enable memory locking to prevent swapping
| |_________________________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:497:5
|
497 | pub fn lock_memory(&self) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: use of `println!`
--> trading_engine/src/affinity.rs:506:9
|
506 | println!("Memory locked to prevent swapping");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:516:9
|
516 | /// - `Ok`(Vec<usize>)` - List of `CPU` core IDs in the affinity mask
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: backticks are unbalanced
--> trading_engine/src/affinity.rs:517:9
|
517 | /// - `Err`(&'static str)` - Error if system call fails
| _________^
518 | | /// Get current `CPU` affinity
| |__________________________________^
|
= help: a backtick may be missing a pair
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:519:5
|
519 | pub fn get_current_affinity(&self) -> Result<Vec<usize>, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: item in documentation is missing backticks
--> trading_engine/src/affinity.rs:548:5
|
548 | /// HftCoreAssignment
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
548 - /// HftCoreAssignment
548 + /// `HftCoreAssignment`
|
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:564:5
|
564 | pub fn apply_for_service(&self, service_name: &str) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/affinity.rs:583:1
|
583 | pub fn initialize_hft_cpu_optimizations(service_name: &str) -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: this function's return value is unnecessary
--> trading_engine/src/affinity.rs:596:1
|
596 | fn disable_cpu_scaling() -> Result<(), &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
596 - fn disable_cpu_scaling() -> Result<(), &'static str> {
596 + fn disable_cpu_scaling() -> () {
|
help: ...and then remove returned values
|
609 - Ok(())
|
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/affinity.rs:604:13
|
604 | let _ = file.write_all(b"performance");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: use of `println!`
--> trading_engine/src/affinity.rs:608:5
|
608 | println!("CPU frequency scaling disabled (performance mode)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: you have declared `#[inline(always)]` on `next`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:38:5
|
38 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `current`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:44:5
|
44 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `reset`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:50:5
|
50 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `set`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:89:5
|
89 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `clear`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:95:5
|
95 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `is_set`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:101:5
|
101 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `test_and_set`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:108:5
|
108 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `compare_and_swap`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:114:5
|
114 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: this method could have a `#[must_use]` attribute
--> trading_engine/src/lockfree/atomic_ops.rs:153:5
|
153 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
error: you have declared `#[inline(always)]` on `record_operation_time`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:171:5
|
171 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `avg_operation_time_ns`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:177:5
|
177 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `operations_per_second`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:188:5
|
188 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:204:13
|
204 | elapsed_ns as f64 / divisor
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
= note: `-D clippy::cast-precision-loss` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::cast_precision_loss)]`
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:208:26
|
208 | let result = ops as f64 / elapsed_secs;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: you have declared `#[inline(always)]` on `total_operations`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:220:5
|
220 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `record_operation`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:226:5
|
226 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `record_error`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:274:5
|
274 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `record_bytes`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:280:5
|
280 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:367:26
|
367 | let result = self.operations_count as f64 / duration_secs;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:383:22
|
383 | let mb = self.bytes_processed as f64 / (1024.0 * 1024.0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:399:24
|
399 | let rate = self.errors_count as f64 / self.operations_count as f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/atomic_ops.rs:399:51
|
399 | let rate = self.errors_count as f64 / self.operations_count as f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: you have declared `#[inline(always)]` on `full`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:417:5
|
417 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `acquire`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:423:5
|
423 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `release`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:429:5
|
429 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `acq_rel`. This is usually a bad idea
--> trading_engine/src/lockfree/atomic_ops.rs:435:5
|
435 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/mpsc_queue.rs:74:24
|
74 | ... let next = unsafe { (*tail).next.load(Ordering::Acquire) }; // SAFETY: Unsafe operation validated - invariants maintained by surrou...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
= note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/lockfree/mpsc_queue.rs:93:25
|
93 | / let _ = self.tail.compare_exchange_weak(
94 | | tail,
95 | | new_node,
96 | | Ordering::Release,
97 | | Ordering::Relaxed,
98 | | );
| |__________________________^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/lockfree/mpsc_queue.rs:103:21
|
103 | / let _ = self.tail.compare_exchange_weak(
104 | | tail,
105 | | next,
106 | | Ordering::Release,
107 | | Ordering::Relaxed,
108 | | );
| |______________________^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/mpsc_queue.rs:121:24
|
121 | ... let next = unsafe { (*head).next.load(Ordering::Acquire) }; // SAFETY: Unsafe operation validated - invariants maintained by surrou...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/lockfree/mpsc_queue.rs:131:21
|
131 | / let _ = self.tail.compare_exchange_weak(
132 | | tail,
133 | | next,
134 | | Ordering::Release,
135 | | Ordering::Relaxed,
136 | | );
| |______________________^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/mpsc_queue.rs:143:32
|
143 | ... let data = unsafe { (*next).data.take() }; // SAFETY: Unsafe operation validated - invariants maintained by surrounding code
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/mpsc_queue.rs:190:13
|
190 | unsafe {
| ^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/lockfree/mpsc_queue.rs:191:17
|
191 | let _ = Box::from_raw(self.dummy_node);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/lockfree/mpsc_queue.rs:283:17
|
283 | let _ = Box::from_raw(node.ptr);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: you have declared `#[inline(always)]` on `next`. This is usually a bad idea
--> trading_engine/src/lockfree/mpsc_queue.rs:329:5
|
329 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `get`. This is usually a bad idea
--> trading_engine/src/lockfree/mpsc_queue.rs:335:5
|
335 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `reset`. This is usually a bad idea
--> trading_engine/src/lockfree/mpsc_queue.rs:341:5
|
341 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `add`. This is usually a bad idea
--> trading_engine/src/lockfree/mpsc_queue.rs:347:5
|
347 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: manual `Debug` impl does not include all fields
--> trading_engine/src/lockfree/ring_buffer.rs:41:1
|
41 | / impl<T> std::fmt::Debug for LockFreeRingBuffer<T> {
42 | | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43 | | f.debug_struct("LockFreeRingBuffer")
44 | | .field("capacity", &self.capacity)
... |
51 | | }
| |_^
|
note: this field is unused
--> trading_engine/src/lockfree/ring_buffer.rs:21:5
|
21 | buffer: NonNull<T>,
| ^^^^^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
= note: `-D clippy::missing-fields-in-debug` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::missing_fields_in_debug)]`
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/ring_buffer.rs:62:5
|
62 | pub fn new(capacity: usize) -> Result<Self, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/ring_buffer.rs:73:22
|
73 | let buffer = unsafe {
| ^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/ring_buffer.rs:100:5
|
100 | pub fn try_push(&self, item: T) -> Result<(), T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `try_push`. This is usually a bad idea
--> trading_engine/src/lockfree/ring_buffer.rs:99:5
|
99 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `try_pop`. This is usually a bad idea
--> trading_engine/src/lockfree/ring_buffer.rs:129:5
|
129 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/ring_buffer.rs:140:20
|
140 | let item = unsafe {
| ^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/ring_buffer.rs:162:9
|
162 | used as f64 / self.capacity as f64
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
--> trading_engine/src/lockfree/ring_buffer.rs:162:23
|
162 | used as f64 / self.capacity as f64
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/small_batch_ring.rs:64:5
|
64 | pub fn new(capacity: usize, batch_mode: BatchMode) -> Result<Self, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/small_batch_ring.rs:76:22
|
76 | let buffer = unsafe {
| ^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/small_batch_ring.rs:97:5
|
97 | pub fn push_batch(&self, items: &[T]) -> Result<usize, usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `push_batch`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:96:5
|
96 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `push_batch_st`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:109:5
|
109 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> trading_engine/src/lockfree/small_batch_ring.rs:124:33
|
124 | for (i, &item) in items.into_iter().take(push_count).enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
error: you have declared `#[inline(always)]` on `push_batch_mt`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:147:5
|
147 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> trading_engine/src/lockfree/small_batch_ring.rs:162:33
|
162 | for (i, &item) in items.into_iter().take(push_count).enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
error: you have declared `#[inline(always)]` on `pop_batch`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:182:5
|
182 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `pop_batch_st`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:195:5
|
195 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: the loop variable `i` is used to index `output`
--> trading_engine/src/lockfree/small_batch_ring.rs:208:18
|
208 | for i in 0..pop_count {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
208 - for i in 0..pop_count {
208 + for (i, <item>) in output.iter_mut().enumerate().take(pop_count) {
|
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:213:17
|
213 | output[i] = (*self.buffer.as_ptr().add(index)).get().read();
| ^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
note: the lint level is defined here
--> trading_engine/src/lockfree/mod.rs:27:5
|
27 | clippy::indexing_slicing
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: you have declared `#[inline(always)]` on `pop_batch_mt`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:230:5
|
230 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: the loop variable `i` is used to index `output`
--> trading_engine/src/lockfree/small_batch_ring.rs:243:18
|
243 | for i in 0..pop_count {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
243 - for i in 0..pop_count {
243 + for (i, <item>) in output.iter_mut().enumerate().take(pop_count) {
|
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:248:17
|
248 | output[i] = (*self.buffer.as_ptr().add(index)).get().read();
| ^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/small_batch_ring.rs:263:5
|
263 | pub fn try_push(&self, item: T) -> Result<(), T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `try_push`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:262:5
|
262 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `try_pop`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:272:5
|
272 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: unsafe block missing a safety comment
--> trading_engine/src/lockfree/small_batch_ring.rs:274:27
|
274 | let mut output = [unsafe { std::mem::zeroed() }]; // SAFETY: Zero-initialized value is valid for this type
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: manual `Debug` impl does not include all fields
--> trading_engine/src/lockfree/small_batch_ring.rs:346:1
|
346 | / impl<T> fmt::Debug for SmallBatchRing<T> {
347 | | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
348 | | let head = self.head.load(Ordering::Relaxed);
349 | | let tail = self.tail.load(Ordering::Relaxed);
... |
359 | | }
| |_^
|
note: this field is unused
--> trading_engine/src/lockfree/small_batch_ring.rs:24:5
|
24 | buffer: NonNull<UnsafeCell<T>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: this field is unused
--> trading_engine/src/lockfree/small_batch_ring.rs:26:5
|
26 | mask: usize,
| ^^^^^^^^^^^
note: this field is unused
--> trading_engine/src/lockfree/small_batch_ring.rs:33:5
|
33 | layout: Layout,
| ^^^^^^^^^^^^^^
= help: consider including all fields in this `Debug` impl
= help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug
error: you have declared `#[inline(always)]` on `add_order`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:407:5
|
407 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:423:9
|
423 | self.order_ids[idx] = order_id;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:424:9
|
424 | self.prices[idx] = price;
| ^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:425:9
|
425 | self.quantities[idx] = quantity;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:426:9
|
426 | self.timestamps[idx] = timestamp;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:427:9
|
427 | self.sides[idx] = side;
| ^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:428:9
|
428 | self.order_types[idx] = order_type;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:431:13
|
431 | self.symbols[idx] = symbol_hash;
| ^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: you have declared `#[inline(always)]` on `clear`. This is usually a bad idea
--> trading_engine/src/lockfree/small_batch_ring.rs:439:5
|
439 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:449:10
|
449 | &self.prices[..self.count]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:456:10
|
456 | &self.quantities[..self.count]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:489:47
|
489 | let prices_vec = _mm256_loadu_pd(&self.prices[i]);
| ^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:490:51
|
490 | let quantities_vec = _mm256_loadu_pd(&self.quantities[i]);
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:506:22
|
506 | total += self.prices[j] * self.quantities[j];
| ^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:506:39
|
506 | total += self.prices[j] * self.quantities[j];
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:515:9
|
515 | self.prices[..self.count]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:517:19
|
517 | .zip(&self.quantities[..self.count])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:533:35
|
533 | .field("order_ids", &&self.order_ids[..self.count])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:534:32
|
534 | .field("prices", &&self.prices[..self.count])
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:535:36
|
535 | .field("quantities", &&self.quantities[..self.count])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/lockfree/small_batch_ring.rs:536:36
|
536 | .field("timestamps", &&self.timestamps[..self.count])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/mod.rs:132:5
|
132 | pub fn new(buffer_size: usize) -> Result<Self, &'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: docs for function returning `Result` missing `# Errors` section
--> trading_engine/src/lockfree/mod.rs:142:5
|
142 | pub fn send(&self, message: HftMessage) -> Result<(), HftMessage> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
error: you have declared `#[inline(always)]` on `send`. This is usually a bad idea
--> trading_engine/src/lockfree/mod.rs:141:5
|
141 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: you have declared `#[inline(always)]` on `try_receive`. This is usually a bad idea
--> trading_engine/src/lockfree/mod.rs:169:5
|
169 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inline_always
error: use Option::map_or instead of an if let/else
--> trading_engine/src/lockfree/mod.rs:172:9
|
172 | / if let Some(message) = self.producer_to_consumer.try_pop() {
173 | | self.stats.messages_received.fetch_add(1, Ordering::Relaxed);
174 | | // Some variant
175 | | Some(message)
... |
178 | | None
179 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
172 ~ self.producer_to_consumer.try_pop().map_or(None, |message| {
173 + self.stats.messages_received.fetch_add(1, Ordering::Relaxed);
174 + // Some variant
175 + Some(message)
176 + })
|
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> trading_engine/src/small_batch_optimizer.rs:227:34
|
227 | for (i, order) in orders.into_iter().enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:228:13
|
228 | self.prices[i] = order.price;
| ^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
note: the lint level is defined here
--> trading_engine/src/small_batch_optimizer.rs:18:5
|
18 | clippy::indexing_slicing
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:229:13
|
229 | self.quantities[i] = order.quantity;
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:230:13
|
230 | self.timestamps[i] = order.timestamp_ns;
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:236:13
|
236 | self.prices[i] = 0.0;
| ^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:237:13
|
237 | self.quantities[i] = 0.0;
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:238:13
|
238 | self.timestamps[i] = 0;
| ^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: unnecessary closure used to substitute value for `Result::Err`
--> trading_engine/src/small_batch_optimizer.rs:307:9
|
307 | / Self::new().unwrap_or_else(|_| Self {
308 | | prices: [0.0; 4],
309 | | quantities: [0.0; 4],
310 | | timestamps: [0; 4],
311 | | })
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_lazy_evaluations)]`
help: use `unwrap_or` instead
|
307 ~ Self::new().unwrap_or(Self {
308 + prices: [0.0; 4],
309 + quantities: [0.0; 4],
310 + timestamps: [0; 4],
311 + })
|
error: indexing may panic
--> trading_engine/src/small_batch_optimizer.rs:343:9
|
343 | self.orders[self.batch_size] = Some(order);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/small_batch_optimizer.rs:386:47
|
386 | let valid_orders: Vec<OrderRequest> = self.orders[..self.batch_size]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/small_batch_optimizer.rs:412:28
|
412 | for &order_opt in &self.orders[..self.batch_size] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: slicing may panic
--> trading_engine/src/small_batch_optimizer.rs:440:27
|
440 | for order in &mut self.orders[..self.batch_size] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> trading_engine/src/events/postgres_writer.rs:148:32
|
148 | let mut receiver = match batch_receiver.write().await.take() {
| ________________________________^
149 | | Some(r) => r,
150 | | None => {
151 | | tracing::error!("Batch receiver not available - processing task cannot start");
... |
154 | | },
155 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
= note: `-D clippy::single-match-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match_else)]`
help: try
|
148 ~ let mut receiver = if let Some(r) = batch_receiver.write().await.take() { r } else {
149 + tracing::error!("Batch receiver not available - processing task cannot start");
150 + metrics.increment_failed_writes();
151 + return;
152 ~ };
|
error: used `unwrap()` on a `Result` value
--> trading_engine/src/events/postgres_writer.rs:381:26
|
381 | let now_ns = std::time::SystemTime::now()
| __________________________^
382 | | .duration_since(std::time::UNIX_EPOCH)
383 | | .unwrap()
| |_________________________^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
--> trading_engine/src/lib.rs:45:5
|
45 | clippy::unwrap_used,
| ^^^^^^^^^^^^^^^^^^^
error: casting to the same type is unnecessary (`i64` -> `i64`)
--> trading_engine/src/events/postgres_writer.rs:387:34
|
387 | let timestamp_secs = (event_data.timestamp_ns / 1_000_000_000) as i64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(event_data.timestamp_ns / 1_000_000_000)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
error: this could be simplified with `bool::then`
--> trading_engine/src/events/ring_buffer.rs:92:9
|
92 | / if !events.is_empty() {
93 | | self.update_stats_pop_success(events.len()).await;
94 | | // Some variant
95 | | Some(events)
... |
98 | | None
99 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
= note: requested on the command line with `-D clippy::if-then-some-else-none`
help: try
|
92 ~ (!events.is_empty()).then(|| { self.update_stats_pop_success(events.len()).await;
93 + // Some variant
94 + Some(; events })
|
error: you should consider adding a `Default` implementation for `EventMetrics`
--> trading_engine/src/events/mod.rs:560:5
|
560 | / pub fn new() -> Self {
561 | | Self {
562 | | events_captured: AtomicU64::new(0),
563 | | events_dropped: AtomicU64::new(0),
... |
574 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `-D clippy::new-without-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::new_without_default)]`
help: try adding this
|
559 + impl Default for EventMetrics {
560 + fn default() -> Self {
561 + Self::new()
562 + }
563 + }
|
error: you should consider adding a `Default` implementation for `HealthMonitor`
--> trading_engine/src/events/mod.rs:689:5
|
689 | / pub fn new() -> Self {
690 | | Self {
691 | | status: RwLock::new(HealthStatus::Healthy),
692 | | }
693 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
688 + impl Default for HealthMonitor {
689 + fn default() -> Self {
690 + Self::new()
691 + }
692 + }
|
error: this can be `std::io::Error::other(_)`
--> trading_engine/src/persistence/backup.rs:175:33
|
175 | BackupError::Io(std::io::Error::new(
| _________________________________^
176 | | std::io::ErrorKind::Other,
177 | | format!("Failed to get system time: {}", e),
178 | | ))
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `-D clippy::io-other-error` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
|
175 ~ BackupError::Io(std::io::Error::other(
176 ~ format!("Failed to get system time: {}", e),
|
error: the borrowed expression implements the required traits
--> trading_engine/src/persistence/backup.rs:295:18
|
295 | .arg(&format!(
| __________________^
296 | | "{}:8088",
297 | | self.extract_host_from_url(&self.persistence_config.influx.url)
298 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`
help: change this to
|
295 ~ .arg(format!(
296 + "{}:8088",
297 + self.extract_host_from_url(&self.persistence_config.influx.url)
298 ~ ))
|
error: this can be `std::io::Error::other(_)`
--> trading_engine/src/persistence/backup.rs:480:33
|
480 | BackupError::Io(std::io::Error::new(
| _________________________________^
481 | | std::io::ErrorKind::Other,
482 | | format!("Failed to get system time: {}", e),
483 | | ))
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
480 ~ BackupError::Io(std::io::Error::other(
481 ~ format!("Failed to get system time: {}", e),
|
error: use of `println!`
--> trading_engine/src/persistence/backup.rs:499:29
|
499 | ... println!("Removing old backup: {}", backup_info.backup_id);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: the borrowed expression implements the required traits
--> trading_engine/src/persistence/clickhouse.rs:142:23
|
142 | .post(&self.base_url.to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.base_url.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/persistence/clickhouse.rs:216:23
|
216 | .post(&self.base_url.to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.base_url.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/persistence/clickhouse.rs:285:23
|
285 | .post(&self.base_url.to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.base_url.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: using `contains()` instead of `iter().any()` is more efficient
--> trading_engine/src/persistence/health.rs:332:19
|
332 | } else if statuses.iter().any(|s| *s == SystemStatus::Unhealthy) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `statuses.contains(&SystemStatus::Unhealthy)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
= note: `-D clippy::manual-contains` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::manual_contains)]`
error: using `contains()` instead of `iter().any()` is more efficient
--> trading_engine/src/persistence/health.rs:334:19
|
334 | } else if statuses.iter().any(|s| *s == SystemStatus::Degraded) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `statuses.contains(&SystemStatus::Degraded)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
error: `format!(..)` appended to existing `String`
--> trading_engine/src/persistence/influxdb.rs:379:13
|
379 | line.push_str(&format!(",{}={}", key, value));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
= note: requested on the command line with `-D clippy::format-push-string`
error: `format!(..)` appended to existing `String`
--> trading_engine/src/persistence/influxdb.rs:394:13
|
394 | line.push_str(&format!(" {}", ts));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: implementation of inherent method `to_string(&self) -> String` for type `persistence::influxdb::FieldValue`
--> trading_engine/src/persistence/influxdb.rs:418:5
|
418 | / fn to_string(&self) -> String {
419 | | match self {
420 | | FieldValue::Float(f) => f.to_string(),
421 | | FieldValue::Integer(i) => format!("{}i", i),
... |
425 | | }
| |_____^
|
= help: implement trait `Display` for type `persistence::influxdb::FieldValue` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
= note: `-D clippy::inherent-to-string` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::inherent_to_string)]`
error: this loop could be written as a `for` loop
--> trading_engine/src/persistence/migrations.rs:137:9
|
137 | while let Some(entry) = entries.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for entry in entries`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]`
error: this could be simplified with `bool::then`
--> trading_engine/src/persistence/migrations.rs:171:24
|
171 | let down_sql = if down_path.exists() {
| ________________________^
172 | | Some(fs::read_to_string(down_path)?)
173 | | } else {
... |
176 | | };
| |_________^ help: try: `down_path.exists().then(|| fs::read_to_string(down_path)?)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
error: this `if` has identical blocks
--> trading_engine/src/persistence/migrations.rs:180:58
|
180 | let id = if parts.len() >= 2 && parts[1] == "up" {
| __________________________________________________________^
181 | | parts[0].to_owned()
182 | | } else {
| |_________^
|
note: same as this
--> trading_engine/src/persistence/migrations.rs:182:16
|
182 | } else {
| ________________^
183 | | parts[0].to_owned()
184 | | };
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::if_same_then_else)]`
error: use of `println!`
--> trading_engine/src/persistence/migrations.rs:248:17
|
248 | println!("Running migration: {} - {}", migration.id, migration.name);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: used underscore-prefixed binding
--> trading_engine/src/persistence/redis.rs:151:13
|
151 | _warm_connections,
| ^^^^^^^^^^^^^^^^^
|
note: binding is defined here
--> trading_engine/src/persistence/redis.rs:144:13
|
144 | let _warm_connections = Arc::new(RwLock::new(VecDeque::new()));
| ^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
= note: `-D clippy::used-underscore-binding` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::used_underscore_binding)]`
error: derefed type is same as origin
--> trading_engine/src/repositories/event_repository.rs:285:24
|
285 | if event.symbol().as_deref() != Some(symbol) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `event.symbol()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
= note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_option_as_deref)]`
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:42:41
|
42 | .unwrap_or_else(|_| panic!("FATAL: Prometheus core counter creation failed - this should be impossible"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
note: the lint level is defined here
--> trading_engine/src/lib.rs:47:5
|
47 | clippy::panic,
| ^^^^^^^^^^^^^
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:61:17
|
61 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:79:17
|
79 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:99:21
|
99 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:119:21
|
119 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:137:21
|
137 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:155:21
|
155 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:173:21
|
173 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:191:21
|
191 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:209:21
|
209 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:227:21
|
227 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: `panic` should not be present in production code
--> trading_engine/src/trading_operations.rs:245:25
|
245 | panic!("Critical error: Cannot initialize Prometheus metrics system")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: this `impl` can be derived
--> trading_engine/src/trading_operations.rs:341:1
|
341 | / impl Default for LiquidityFlag {
342 | | fn default() -> Self {
343 | | LiquidityFlag::Unknown
344 | | }
345 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `-D clippy::derivable-impls` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`
help: replace the manual implementation with a derive attribute and mark the default variant
|
322 + #[derive(Default)]
323 ~ pub enum LiquidityFlag {
324 | // Maker variant
...
328 | // Unknown variant
329 ~ #[default]
330 ~ Unknown,
|
error: using `clone` on type `OrderId` which implements the `Copy` trait
--> trading_engine/src/trading/broker_client.rs:363:21
|
363 | .insert(order.id.clone(), tws_order_id);
| ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order.id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
error: wildcard matches known variants and will also match future added variants
--> trading_engine/src/trading/broker_client.rs:389:17
|
389 | _ => "MKT".to_string(),
| ^ help: try: `OrderType::Iceberg | OrderType::TrailingStop | OrderType::Hidden | _`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
= note: requested on the command line with `-D clippy::wildcard-enum-match-arm`
error: using `clone` on type `u32` which implements the `Copy` trait
--> trading_engine/src/trading/broker_client.rs:411:13
|
411 | / order_mapping
412 | | .get(order_id)
413 | | .ok_or_else(|| {
414 | | BrokerError::OrderNotFound(format!(
... |
418 | | })?
419 | | .clone()
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
help: try dereferencing it
|
411 ~ *order_mapping
412 + .get(order_id)
413 + .ok_or_else(|| {
414 + BrokerError::OrderNotFound(format!(
415 + "Order {} not found in IB order mapping",
416 + order_id
417 + ))
418 + })?
|
error: you should consider adding a `Default` implementation for `BrokerClient`
--> trading_engine/src/trading/broker_client.rs:559:5
|
559 | / pub fn new() -> Self {
560 | | Self {
561 | | brokers: Arc::new(RwLock::new(HashMap::new())),
562 | | primary_broker: Arc::new(RwLock::new(None)),
... |
567 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
557 + impl Default for BrokerClient {
558 + fn default() -> Self {
559 + Self::new()
560 + }
561 + }
|
error: the function has a cognitive complexity of (51/30)
--> trading_engine/src/trading/broker_client.rs:634:18
|
634 | pub async fn connect_all_brokers(&self) -> Result<(), BrokerError> {
| ^^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
error: the function has a cognitive complexity of (36/30)
--> trading_engine/src/trading/broker_client.rs:899:18
|
899 | pub async fn disconnect_all_brokers(&self) -> Result<(), BrokerError> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
error: using `clone` on type `OrderSide` which implements the `Copy` trait
--> trading_engine/src/trading/engine.rs:88:19
|
88 | side: side.clone(),
| ^^^^^^^^^^^^ help: try removing the `clone` call: `side`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
error: using `clone` on type `OrderType` which implements the `Copy` trait
--> trading_engine/src/trading/engine.rs:89:25
|
89 | order_type: order_type.clone(),
| ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order_type`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
error: using `clone` on type `OrderStatus` which implements the `Copy` trait
--> trading_engine/src/trading/order_manager.rs:80:30
|
80 | let old_status = order.status.clone();
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `order.status`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
error: wildcard matches known variants and will also match future added variants
--> trading_engine/src/trading/order_manager.rs:181:17
|
181 | _ => true, // Keep active orders
| ^ help: try: `OrderStatus::Created | OrderStatus::Submitted | OrderStatus::PartiallyFilled | OrderStatus::New | OrderStatus::Expired | OrderStatus::Pending | OrderStatus::Working | OrderStatus::Unknown | OrderStatus::Suspended | OrderStatus::PendingCancel | OrderStatus::PendingReplace | _`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
error: wildcard matches known variants and will also match future added variants
--> trading_engine/src/trading/order_manager.rs:207:17
|
207 | _ => {},
| ^ help: try: `OrderStatus::Created | OrderStatus::New | OrderStatus::Expired | OrderStatus::Pending | OrderStatus::Working | OrderStatus::Unknown | OrderStatus::Suspended | OrderStatus::PendingCancel | OrderStatus::PendingReplace | _`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
error: manual implementation of an assign operation
--> trading_engine/src/trading/position_manager.rs:102:17
|
102 | position.realized_pnl = position.realized_pnl + realized_pnl;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position.realized_pnl += realized_pnl`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `-D clippy::assign-op-pattern` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::assign_op_pattern)]`
error: manual implementation of an assign operation
--> trading_engine/src/trading/position_manager.rs:125:17
|
125 | position.realized_pnl = position.realized_pnl + realized_pnl;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position.realized_pnl += realized_pnl`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
error: this `impl` can be derived
--> trading_engine/src/brokers/config.rs:75:1
|
75 | / impl Default for BrokerConfigs {
76 | | fn default() -> Self {
77 | | Self {
78 | | interactive_brokers: InteractiveBrokersConfig::default(),
... |
82 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
|
68 + #[derive(Default)]
69 ~ pub struct BrokerConfigs {
|
error: this `impl` can be derived
--> trading_engine/src/brokers/config.rs:121:1
|
121 | / impl Default for BrokerConnectorConfig {
122 | | fn default() -> Self {
123 | | Self {
124 | | brokers: BrokerConfigs::default(),
... |
129 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
|
112 + #[derive(Default)]
113 ~ pub struct BrokerConnectorConfig {
|
error: direct implementation of `ToString`
--> trading_engine/src/brokers/fix.rs:39:1
|
39 | / impl ToString for FixMessage {
40 | | fn to_string(&self) -> String {
41 | | let mut result = format!("35={}\u{0001}", self.msg_type);
42 | | for (tag, value) in &self.fields {
... |
47 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `-D clippy::to-string-trait-impl` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::to_string_trait_impl)]`
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/fix.rs:43:13
|
43 | result.push_str(&format!("{}={}\u{0001}", tag, value));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`
--> trading_engine/src/brokers/icmarkets.rs:206:5
|
206 | / pub fn from_str(s: &str) -> Option<Self> {
207 | | match s {
208 | | "A" => Some(Self::Logon),
209 | | "5" => Some(Self::Logout),
... |
221 | | }
| |_____^
|
= help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `-D clippy::should-implement-trait` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::should_implement_trait)]`
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:327:9
|
327 | msg.push_str(&format!("35={}\u{0001}", self.msg_type.as_str())); // MsgType
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:328:9
|
328 | msg.push_str(&format!("49={}\u{0001}", self.sender_comp_id)); // SenderCompID
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:329:9
|
329 | msg.push_str(&format!("56={}\u{0001}", self.target_comp_id)); // TargetCompID
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:330:9
|
330 | msg.push_str(&format!("34={}\u{0001}", self.msg_seq_num)); // MsgSeqNum
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:331:9
|
331 | / msg.push_str(&format!(
332 | | "52={}\u{0001}",
333 | | Utc::now().format("%Y%m%d-%H:%M:%S")
334 | | )); // SendingTime
| |__________^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/brokers/icmarkets.rs:338:13
|
338 | msg.push_str(&format!("{}={}\u{0001}", tag, value));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: found empty brackets on struct declaration
--> trading_engine/src/brokers/mod.rs:30:27
|
30 | pub struct BrokerConnector {}
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
= note: requested on the command line with `-D clippy::empty-structs-with-brackets`
= help: remove the brackets
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:203:9
|
203 | println!("\u{1f680} Starting Comprehensive Performance Benchmarks");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:204:9
|
204 | println!("Target: <{}ns latency", self.config.target_latency_ns);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:208:13
|
208 | / println!(
209 | | "\u{26a0}\u{fe0f} TSC calibration failed: {}, using system clock fallback",
210 | | e
211 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:221:9
|
221 | println!("\n\u{1f3af} PERFORMANCE BENCHMARK SUMMARY");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:222:9
|
222 | println!("=================================");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:231:17
|
231 | println!("\u{2705} {}: {:.1}ns avg", result.test_name, result.avg_ns);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:233:17
|
233 | / println!(
234 | | "\u{274c} {}: {:.1}ns avg (target: {}ns)",
235 | | result.test_name, result.avg_ns, self.config.target_latency_ns
236 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:240:9
|
240 | / println!(
241 | | "\nOverall: {}/{} tests passed ({}%)",
242 | | passed,
243 | | total,
244 | | (passed * 100) / total
245 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:253:9
|
253 | println!("\n\u{1f4ca} SIMD Performance Benchmarks");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:256:13
|
256 | println!("\u{26a0}\u{fe0f} AVX2 not available, using scalar fallback");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:268:5
|
268 | fn benchmark_simd_vwap_calculation(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
268 - fn benchmark_simd_vwap_calculation(&mut self) -> Result<(), String> {
268 + fn benchmark_simd_vwap_calculation(&mut self) -> () {
|
help: ...and then remove returned values
|
323 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:295:25
|
295 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:310:23
|
310 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:326:5
|
326 | fn benchmark_simd_price_sorting(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
326 - fn benchmark_simd_price_sorting(&mut self) -> Result<(), String> {
326 + fn benchmark_simd_price_sorting(&mut self) -> () {
|
help: ...and then remove returned values
|
367 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:343:25
|
343 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:358:23
|
358 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:370:5
|
370 | fn benchmark_simd_risk_var_calculation(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
370 - fn benchmark_simd_risk_var_calculation(&mut self) -> Result<(), String> {
370 + fn benchmark_simd_risk_var_calculation(&mut self) -> () {
|
help: ...and then remove returned values
|
435 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:395:25
|
395 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:423:23
|
423 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:438:5
|
438 | fn benchmark_simd_market_data_processing(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
438 - fn benchmark_simd_market_data_processing(&mut self) -> Result<(), String> {
438 + fn benchmark_simd_market_data_processing(&mut self) -> () {
|
help: ...and then remove returned values
|
493 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:462:25
|
462 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:481:23
|
481 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:496:5
|
496 | fn benchmark_simd_vs_scalar_speedup(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
496 - fn benchmark_simd_vs_scalar_speedup(&mut self) -> Result<(), String> {
496 + fn benchmark_simd_vs_scalar_speedup(&mut self) -> () {
|
help: ...and then remove returned values
|
574 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:504:29
|
504 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:528:27
|
528 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:538:25
|
538 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:540:23
|
540 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:554:9
|
554 | / println!(
555 | | " SIMD vs Scalar Speedup: {:.2}x (SIMD: {}ns, Scalar: {}ns)",
556 | | scalar_avg as f64 / simd_avg as f64,
557 | | simd_avg,
558 | | scalar_avg
559 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:580:9
|
580 | println!("\n\u{1f512} Lock-Free Structure Benchmarks");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:599:13
|
599 | let _ = buffer.try_push(i as u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:605:25
|
605 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:607:13
|
607 | let _ = buffer.try_push(i as u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:610:23
|
610 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:622:5
|
622 | fn benchmark_mpsc_queue(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
622 - fn benchmark_mpsc_queue(&mut self) -> Result<(), String> {
622 + fn benchmark_mpsc_queue(&mut self) -> () {
|
help: ...and then remove returned values
|
648 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:635:25
|
635 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:640:23
|
640 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:660:13
|
660 | let _ = channel.send(msg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: non-binding `let` on a result of a `#[must_use]` function
--> trading_engine/src/comprehensive_performance_benchmarks.rs:661:13
|
661 | let _ = channel.try_receive();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using function result
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:668:25
|
668 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:670:13
|
670 | let _ = channel.send(msg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:673:23
|
673 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:698:13
|
698 | let _ = ring.try_push(order_data);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:706:25
|
706 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: non-binding `let` on an expression with `#[must_use]` type
--> trading_engine/src/comprehensive_performance_benchmarks.rs:708:13
|
708 | let _ = ring.try_push(order_data);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider explicitly using expression value
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:712:23
|
712 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:723:5
|
723 | fn benchmark_atomic_operations(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
723 - fn benchmark_atomic_operations(&mut self) -> Result<(), String> {
723 + fn benchmark_atomic_operations(&mut self) -> () {
|
help: ...and then remove returned values
|
748 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:734:25
|
734 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:739:23
|
739 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:754:9
|
754 | println!("\n\u{23f1}\u{fe0f} RDTSC Timing Accuracy Tests");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:765:5
|
765 | fn benchmark_rdtsc_overhead(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
765 - fn benchmark_rdtsc_overhead(&mut self) -> Result<(), String> {
765 + fn benchmark_rdtsc_overhead(&mut self) -> () {
|
help: ...and then remove returned values
|
779 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:770:25
|
770 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:771:23
|
771 | let end = unsafe { _rdtsc() };
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:782:5
|
782 | fn benchmark_rdtsc_vs_system_clock(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
782 - fn benchmark_rdtsc_vs_system_clock(&mut self) -> Result<(), String> {
782 + fn benchmark_rdtsc_vs_system_clock(&mut self) -> () {
|
help: ...and then remove returned values
|
828 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:788:25
|
788 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:791:23
|
791 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:810:9
|
810 | / println!(
811 | | " RDTSC vs System Clock: RDTSC {}ns, System {}ns",
812 | | rdtsc_avg, system_avg
813 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:831:5
|
831 | fn benchmark_hardware_timestamp(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
831 - fn benchmark_hardware_timestamp(&mut self) -> Result<(), String> {
831 + fn benchmark_hardware_timestamp(&mut self) -> () {
|
help: ...and then remove returned values
|
857 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:841:25
|
841 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:845:23
|
845 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:860:5
|
860 | fn benchmark_latency_measurement(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
860 - fn benchmark_latency_measurement(&mut self) -> Result<(), String> {
860 + fn benchmark_latency_measurement(&mut self) -> () {
|
help: ...and then remove returned values
|
885 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:871:25
|
871 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:876:23
|
876 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:888:5
|
888 | fn benchmark_timing_consistency(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
888 - fn benchmark_timing_consistency(&mut self) -> Result<(), String> {
888 + fn benchmark_timing_consistency(&mut self) -> () {
|
help: ...and then remove returned values
|
905 - Ok(())
|
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:911:9
|
911 | println!("\n\u{1f4cb} Order Processing Latency Benchmarks");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:937:25
|
937 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:946:23
|
946 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:980:25
|
980 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:982:23
|
982 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1018:25
|
1018 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1020:23
|
1020 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1032:5
|
1032 | fn benchmark_execution_processing(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1032 - fn benchmark_execution_processing(&mut self) -> Result<(), String> {
1032 + fn benchmark_execution_processing(&mut self) -> () {
|
help: ...and then remove returned values
|
1094 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1079:25
|
1079 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1081:23
|
1081 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1102:25
|
1102 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1150:23
|
1150 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1168:9
|
1168 | println!("\n\u{1f4be} Memory Allocation Pattern Tests");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1181:5
|
1181 | fn benchmark_stack_allocation(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1181 - fn benchmark_stack_allocation(&mut self) -> Result<(), String> {
1181 + fn benchmark_stack_allocation(&mut self) -> () {
|
help: ...and then remove returned values
|
1201 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1186:25
|
1186 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: used underscore-prefixed binding
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1190:35
|
1190 | std::hint::black_box(&_buffer);
| ^^^^^^^
|
note: binding is defined here
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1189:17
|
1189 | let _buffer: [u64; 128] = [0; 128];
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1192:23
|
1192 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1204:5
|
1204 | fn benchmark_heap_allocation(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1204 - fn benchmark_heap_allocation(&mut self) -> Result<(), String> {
1204 + fn benchmark_heap_allocation(&mut self) -> () {
|
help: ...and then remove returned values
|
1224 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1209:25
|
1209 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1216:23
|
1216 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1227:5
|
1227 | fn benchmark_pool_allocation(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1227 - fn benchmark_pool_allocation(&mut self) -> Result<(), String> {
1227 + fn benchmark_pool_allocation(&mut self) -> () {
|
help: ...and then remove returned values
|
1261 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1240:25
|
1240 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1253:23
|
1253 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1269:25
|
1269 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1274:23
|
1274 | let ptr = unsafe { alloc(layout) }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1291:23
|
1291 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1303:5
|
1303 | fn benchmark_zero_copy_operations(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1303 - fn benchmark_zero_copy_operations(&mut self) -> Result<(), String> {
1303 + fn benchmark_zero_copy_operations(&mut self) -> () {
|
help: ...and then remove returned values
|
1327 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1309:25
|
1309 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1315:23
|
1315 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1330:5
|
1330 | fn benchmark_memory_prefetching(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1330 - fn benchmark_memory_prefetching(&mut self) -> Result<(), String> {
1330 + fn benchmark_memory_prefetching(&mut self) -> () {
|
help: ...and then remove returned values
|
1361 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1336:25
|
1336 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1352:23
|
1352 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1364:5
|
1364 | fn benchmark_cache_locality(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
1364 - fn benchmark_cache_locality(&mut self) -> Result<(), String> {
1364 + fn benchmark_cache_locality(&mut self) -> () {
|
help: ...and then remove returned values
|
1387 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1370:25
|
1370 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/comprehensive_performance_benchmarks.rs:1379:23
|
1379 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: named constant with interior mutability
--> trading_engine/src/metrics.rs:175:15
|
175 | const INIT: CachePadded<AtomicU64> = CachePadded::new(AtomicU64::new(0));
| ^^^^
|
= help: did you mean to make this a `static` item
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
= note: `-D clippy::declare-interior-mutable-const` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::declare_interior_mutable_const)]`
error: `format!(..)` appended to existing `String`
--> trading_engine/src/metrics.rs:528:13
|
528 | result.push_str(&format!("# HELP {} {}\n", self.name, self.help));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/metrics.rs:538:9
|
538 | result.push_str(&format!("# TYPE {} {}\n", self.name, type_str));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/metrics.rs:542:13
|
542 | result.push_str(&format!("{} {}\n", self.name, self.value));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> trading_engine/src/metrics.rs:549:13
|
549 | / result.push_str(&format!(
550 | | "{}{{{}}} {}\n",
551 | | self.name,
552 | | labels_str.join(","),
553 | | self.value
554 | | ));
| |______________^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: this could be simplified with `bool::then`
--> trading_engine/src/tracing.rs:170:29
|
170 | parent_span_id: if self.parent_id > 0 {
| _____________________________^
171 | | Some(format!("{:016x}", self.parent_id))
172 | | } else {
... |
175 | | },
| |_____________^ help: try: `(self.parent_id > 0).then(|| format!("{:016x}", self.parent_id))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
error: used `expect()` on an `Option` value
--> trading_engine/src/tracing.rs:457:5
|
457 | / GLOBAL_TRACER
458 | | .get()
459 | | .expect("Global tracer not initialized. Call init_global_tracer() first.")
| |__________________________________________________________________________________^
|
= note: if this value is `None`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_used
note: the lint level is defined here
--> trading_engine/src/lib.rs:46:5
|
46 | clippy::expect_used,
| ^^^^^^^^^^^^^^^^^^^
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:90:23
|
90 | let ptr = unsafe { alloc(layout) }; // SAFETY: Allocator operations use valid layout with correct alignment and size
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: `panic` should not be present in production code
--> trading_engine/src/advanced_memory_benchmarks.rs:146:9
|
146 | panic!("Failed to return block to pool - pool full or corrupted");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:156:35
|
156 | Ok(layout) => unsafe {
| ^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: you should consider adding a `Default` implementation for `CacheAlignedOrderBuffer`
--> trading_engine/src/advanced_memory_benchmarks.rs:182:5
|
182 | / pub fn new() -> Self {
183 | | // Initialize array without requiring Copy trait
184 | | let orders = std::array::from_fn(|_| Order::default());
185 | | Self {
... |
190 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
181 + impl Default for CacheAlignedOrderBuffer {
182 + fn default() -> Self {
183 + Self::new()
184 + }
185 + }
|
error: use of `println!`
--> trading_engine/src/advanced_memory_benchmarks.rs:266:9
|
266 | println!("\u{1f9e0} Starting Advanced Memory Benchmarks");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/advanced_memory_benchmarks.rs:278:9
|
278 | println!("\n\u{1f3af} MEMORY BENCHMARK SUMMARY");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/advanced_memory_benchmarks.rs:279:9
|
279 | println!("============================");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/advanced_memory_benchmarks.rs:282:13
|
282 | / println!(
283 | | "\u{2713} {}: {:.1}ns avg, {:.1} MB/s throughput",
284 | | result.test_name, result.avg_ns, result.throughput_mb_per_sec
285 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:306:25
|
306 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:317:23
|
317 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:361:25
|
361 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:368:23
|
368 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: used unwrap or expect in a function that returns result or option
--> trading_engine/src/advanced_memory_benchmarks.rs:392:5
|
392 | / fn benchmark_cache_aligned_structures(&mut self) -> Result<(), String> {
393 | | let mut buffer = CacheAlignedOrderBuffer::new();
394 | | let mut measurements = Vec::new();
... |
445 | | Ok(())
446 | | }
| |_____^
|
= help: unwrap and expect should not be used in a function that returns result or option
note: potential non-recoverable error(s)
--> trading_engine/src/advanced_memory_benchmarks.rs:400:32
|
400 | let quantity = Quantity::from_f64(100.0)
| ________________________________^
401 | | .map_err(|e| format!("Failed to create test quantity: {}", e))
402 | | .unwrap();
| |_____________________________^
403 | let price = Price::from_f64(500.0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
= note: requested on the command line with `-D clippy::unwrap-in-result`
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:392:5
|
392 | fn benchmark_cache_aligned_structures(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
392 - fn benchmark_cache_aligned_structures(&mut self) -> Result<(), String> {
392 + fn benchmark_cache_aligned_structures(&mut self) -> () {
|
help: ...and then remove returned values
|
445 - Ok(())
|
error: used `unwrap()` on a `Result` value
--> trading_engine/src/advanced_memory_benchmarks.rs:400:32
|
400 | let quantity = Quantity::from_f64(100.0)
| ________________________________^
401 | | .map_err(|e| format!("Failed to create test quantity: {}", e))
402 | | .unwrap();
| |_____________________________^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
error: used `unwrap()` on a `Result` value
--> trading_engine/src/advanced_memory_benchmarks.rs:403:29
|
403 | let price = Price::from_f64(500.0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:410:25
|
410 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:424:23
|
424 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:448:5
|
448 | fn benchmark_memory_prefetching_patterns(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
448 - fn benchmark_memory_prefetching_patterns(&mut self) -> Result<(), String> {
448 + fn benchmark_memory_prefetching_patterns(&mut self) -> () {
|
help: ...and then remove returned values
|
508 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:455:25
|
455 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:476:23
|
476 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:511:5
|
511 | fn benchmark_zero_copy_processing(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
511 - fn benchmark_zero_copy_processing(&mut self) -> Result<(), String> {
511 + fn benchmark_zero_copy_processing(&mut self) -> () {
|
help: ...and then remove returned values
|
559 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:517:25
|
517 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:529:23
|
529 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:562:5
|
562 | fn benchmark_memory_bandwidth_utilization(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
562 - fn benchmark_memory_bandwidth_utilization(&mut self) -> Result<(), String> {
562 + fn benchmark_memory_bandwidth_utilization(&mut self) -> () {
|
help: ...and then remove returned values
|
615 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:571:25
|
571 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: accessing first element with `source.get(0)`
--> trading_engine/src/advanced_memory_benchmarks.rs:577:32
|
577 | if let Some(val) = source.get(0) {
| ^^^^^^^^^^^^^ help: try: `source.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `-D clippy::get-first` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:584:23
|
584 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:618:5
|
618 | fn benchmark_tlb_efficiency(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
618 - fn benchmark_tlb_efficiency(&mut self) -> Result<(), String> {
618 + fn benchmark_tlb_efficiency(&mut self) -> () {
|
help: ...and then remove returned values
|
663 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:633:25
|
633 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:642:23
|
642 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: used unwrap or expect in a function that returns result or option
--> trading_engine/src/advanced_memory_benchmarks.rs:666:5
|
666 | / fn benchmark_memory_fragmentation_patterns(&mut self) -> Result<(), String> {
667 | | // Simulate fragmentation by allocating and deallocating in patterns
668 | | let mut allocations = Vec::new();
669 | | let mut measurements = Vec::new();
... |
740 | | Ok(())
741 | | }
| |_____^
|
= help: unwrap and expect should not be used in a function that returns result or option
note: potential non-recoverable error(s)
--> trading_engine/src/advanced_memory_benchmarks.rs:677:30
|
677 | let layout = Layout::from_size_align(64, 8).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
error: this function's return value is unnecessary
--> trading_engine/src/advanced_memory_benchmarks.rs:666:5
|
666 | fn benchmark_memory_fragmentation_patterns(&mut self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
666 - fn benchmark_memory_fragmentation_patterns(&mut self) -> Result<(), String> {
666 + fn benchmark_memory_fragmentation_patterns(&mut self) -> () {
|
help: ...and then remove returned values
|
740 - Ok(())
|
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:673:25
|
673 | let start = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: used `unwrap()` on a `Result` value
--> trading_engine/src/advanced_memory_benchmarks.rs:677:30
|
677 | let layout = Layout::from_size_align(64, 8).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:678:27
|
678 | ... let ptr = unsafe { System.alloc(layout) }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/advanced_memory_benchmarks.rs:701:23
|
701 | let end = unsafe { _rdtsc() }; // SAFETY: RDTSC instruction only reads CPU timestamp counter with no side effects
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/test_runner.rs:88:9
|
88 | println!("\u{1f680} FOXHUNT HFT PERFORMANCE VALIDATION SUITE");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:89:9
|
89 | println!("=============================================");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:90:9
|
90 | / println!(
91 | | "Target Latency: {}ns ({:.1}\u{3bc}s)",
92 | | self.config.target_latency_ns,
93 | | self.config.target_latency_ns as f64 / 1000.0
94 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:95:9
|
95 | println!("Iterations per test: {}", self.config.iterations);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:96:9
|
96 | println!();
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessary
--> trading_engine/src/test_runner.rs:142:5
|
142 | fn initialize_timing_subsystem(&self) -> Result<(), String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove the return type...
|
142 - fn initialize_timing_subsystem(&self) -> Result<(), String> {
142 + fn initialize_timing_subsystem(&self) -> () {
|
help: ...and then remove returned values
|
176 - Ok(())
|
error: use of `println!`
--> trading_engine/src/test_runner.rs:143:9
|
143 | println!("\u{23f1}\u{fe0f} Initializing High-Precision Timing Subsystem");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:148:17
|
148 | println!("\u{2713} TSC calibrated: {} Hz", frequency);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:150:21
|
150 | println!("\u{2713} TSC reliability confirmed");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:152:21
|
152 | println!("\u{26a0}\u{fe0f} TSC reliability concerns detected");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:156:17
|
156 | println!("\u{26a0}\u{fe0f} TSC calibration failed: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:157:17
|
157 | println!(" Using system clock fallback");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:165:17
|
165 | println!("\u{2713} AVX2 SIMD support detected");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:167:17
|
167 | println!("\u{26a0}\u{fe0f} AVX2 not available - using scalar fallback");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:171:17
|
171 | println!("\u{2713} AVX-512 support detected");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:175:9
|
175 | println!();
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:181:9
|
181 | println!("\u{1f4ca} Running Comprehensive Performance Benchmarks (25+ tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:213:9
|
213 | / println!(
214 | | "\u{2713} Comprehensive benchmarks completed in {}ms",
215 | | duration
216 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:230:9
|
230 | println!("\u{1f4be} Running Advanced Memory Benchmarks (8+ tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:248:9
|
248 | println!("\u{2713} Memory benchmarks completed in {}ms", duration);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:254:9
|
254 | println!("\u{1f525} Running Stress Tests");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:273:9
|
273 | println!("\u{2713} Stress tests completed in {}ms", duration);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:309:9
|
309 | println!(" Multithreaded stress: {}ns per operation", avg_ns_per_op);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/test_runner.rs:315:5
|
315 | fn run_sustained_load_test(&self) -> Result<u64, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
315 - fn run_sustained_load_test(&self) -> Result<u64, String> {
315 + fn run_sustained_load_test(&self) -> u64 {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
346 - Ok(avg_ns)
346 + avg_ns
|
error: unsafe block missing a safety comment
--> trading_engine/src/test_runner.rs:324:32
|
324 | let start_cycles = unsafe { _rdtsc() };
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: unsafe block missing a safety comment
--> trading_engine/src/test_runner.rs:329:30
|
329 | let end_cycles = unsafe { _rdtsc() };
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
error: use of `println!`
--> trading_engine/src/test_runner.rs:341:9
|
341 | / println!(
342 | | " Sustained load: {} operations, {}ns avg",
343 | | operation_count, avg_ns
344 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/test_runner.rs:350:5
|
350 | fn run_memory_pressure_test(&self) -> Result<u64, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
350 - fn run_memory_pressure_test(&self) -> Result<u64, String> {
350 + fn run_memory_pressure_test(&self) -> u64 {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
376 - Ok(avg_ns_per_alloc)
376 + avg_ns_per_alloc
|
error: use of `println!`
--> trading_engine/src/test_runner.rs:371:9
|
371 | / println!(
372 | | " Memory pressure: {}ns per 1KB allocation",
373 | | avg_ns_per_alloc
374 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/test_runner.rs:380:5
|
380 | / fn generate_test_summary(
381 | | &self,
382 | | results: &[String],
383 | | _timings: &[(String, u64)],
384 | | total_duration: std::time::Duration,
385 | | ) -> Result<TestSuiteResults, String> {
| |_________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
385 - ) -> Result<TestSuiteResults, String> {
385 + ) -> test_runner::TestSuiteResults {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
427 ~ TestSuiteResults {
428 + total_tests,
429 + passed_tests: passed,
430 + failed_tests: failed,
431 + total_duration_ms: total_duration.as_millis() as u64,
432 + overall_success_rate: success_rate,
433 + fastest_test,
434 + slowest_test,
435 + performance_summary,
436 + }
|
error: use of `println!`
--> trading_engine/src/test_runner.rs:441:9
|
441 | println!("\n\u{1f3af} PERFORMANCE VALIDATION SUMMARY");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:442:9
|
442 | println!("=================================");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:443:9
|
443 | println!("Total Tests: {}", summary.total_tests);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:444:9
|
444 | / println!(
445 | | "Passed: {} ({:.1}%)",
446 | | summary.passed_tests,
447 | | summary.overall_success_rate * 100.0
448 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:449:9
|
449 | println!("Failed: {}", summary.failed_tests);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:450:9
|
450 | println!("Test Duration: {}ms", summary.total_duration_ms);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:451:9
|
451 | / println!(
452 | | "Success Rate: {:.1}%",
453 | | summary.overall_success_rate * 100.0
454 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:455:9
|
455 | println!();
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:458:13
|
458 | println!("Fastest Test: {}", fastest);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:461:13
|
461 | println!("Slowest Test: {}", slowest);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:463:9
|
463 | println!("Performance: {}", summary.performance_summary);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:464:9
|
464 | println!();
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:468:13
|
468 | println!("\u{1f389} EXCELLENT: System performance exceeds HFT requirements!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:470:13
|
470 | println!("\u{2705} GOOD: System performance meets HFT requirements");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:472:13
|
472 | println!("\u{26a0}\u{fe0f} MARGINAL: Some performance issues detected");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:474:13
|
474 | println!("\u{274c} POOR: System performance below HFT requirements");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:577:5
|
577 | println!("\u{1f52c} FOXHUNT HFT PERFORMANCE BENCHMARK DEMONSTRATION");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:578:5
|
578 | println!("==================================================");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:581:5
|
581 | println!("\n1. Running Quick Validation (10K iterations)...");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:584:13
|
584 | / println!(
585 | | " \u{2713} Quick validation completed: {}/{} tests passed",
586 | | summary.passed_tests, summary.total_tests
587 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:589:19
|
589 | Err(e) => println!(" \u{274c} Quick validation failed: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:593:5
|
593 | println!("\n2. Running Comprehensive Validation (50K iterations)...");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:596:13
|
596 | / println!(
597 | | " \u{2713} Comprehensive validation completed: {}/{} tests passed",
598 | | summary.passed_tests, summary.total_tests
599 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:600:13
|
600 | println!(" Performance: {}", summary.performance_summary);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:602:19
|
602 | Err(e) => println!(" \u{274c} Comprehensive validation failed: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:605:5
|
605 | println!("\n\u{1f3af} Performance benchmark demonstration completed!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:606:5
|
606 | println!(" Total benchmark categories: 5");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:607:5
|
607 | println!(" - SIMD operations (5 tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:608:5
|
608 | println!(" - Lock-free structures (5 tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:609:5
|
609 | println!(" - RDTSC timing accuracy (5 tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:610:5
|
610 | println!(" - Order processing latency (5 tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:611:5
|
611 | println!(" - Memory allocation patterns (7+ tests)");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/test_runner.rs:612:5
|
612 | println!(" Total: 27+ individual performance tests");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: the function has a cognitive complexity of (42/30)
--> trading_engine/src/compliance/audit_trails.rs:368:14
|
368 | async fn background_flush_worker(
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/audit_trails.rs:477:19
|
477 | .bind(&event.timestamp)
| ^^^^^^^^^^^^^^^^ help: change this to: `event.timestamp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: found empty brackets on struct declaration
--> trading_engine/src/compliance/audit_trails.rs:723:24
|
723 | pub struct IndexManager {}
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
= help: remove the brackets
error: infinite loop detected
--> trading_engine/src/compliance/audit_trails.rs:1078:13
|
1078 | / loop {
1079 | | interval.tick().await;
... |
1088 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
= note: requested on the command line with `-D clippy::infinite-loop`
error: use of `eprintln!`
--> trading_engine/src/compliance/audit_trails.rs:1085:25
|
1085 | eprintln!("Failed to persist audit events: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
= note: `-D clippy::print-stderr` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::print_stderr)]`
error: infinite loop detected
--> trading_engine/src/compliance/audit_trails.rs:1100:13
|
1100 | / loop {
1101 | | interval.tick().await;
1102 | |
1103 | | if let Err(e) = retention_manager.cleanup_expired_events().await {
... |
1106 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: use of `eprintln!`
--> trading_engine/src/compliance/audit_trails.rs:1104:21
|
1104 | eprintln!("Failed to cleanup expired audit events: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/audit_trails.rs:1269:19
|
1269 | .bind(&event.timestamp)
| ^^^^^^^^^^^^^^^^ help: change this to: `event.timestamp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: redundant closure
--> trading_engine/src/compliance/audit_trails.rs:1277:26
|
1277 | .map_err(|e| AuditTrailError::Serialization(e))?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `AuditTrailError::Serialization`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
error: you should consider adding a `Default` implementation for `BatchProcessor`
--> trading_engine/src/compliance/audit_trails.rs:1424:5
|
1424 | / pub fn new() -> Self {
1425 | | Self {
1426 | | pending_events: Vec::new(),
1427 | | last_flush: Utc::now(),
... |
1430 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
1423 + impl Default for BatchProcessor {
1424 + fn default() -> Self {
1425 + Self::new()
1426 + }
1427 + }
|
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/audit_trails.rs:1584:19
|
1584 | .bind(&query.start_time)
| ^^^^^^^^^^^^^^^^^ help: change this to: `query.start_time`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/audit_trails.rs:1585:19
|
1585 | .bind(&query.end_time);
| ^^^^^^^^^^^^^^^ help: change this to: `query.end_time`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: use of `eprintln!`
--> trading_engine/src/compliance/audit_trails.rs:1622:17
|
1622 | / eprintln!(
1623 | | "Warning: Audit log integrity check failed for event {}",
1624 | | event.event_id
1625 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: you should consider adding a `Default` implementation for `IndexManager`
--> trading_engine/src/compliance/audit_trails.rs:1807:5
|
1807 | / pub fn new() -> Self {
1808 | | IndexManager {}
1809 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
1806 + impl Default for IndexManager {
1807 + fn default() -> Self {
1808 + Self::new()
1809 + }
1810 + }
|
error: you should consider adding a `Default` implementation for `QueryCache`
--> trading_engine/src/compliance/audit_trails.rs:1813:5
|
1813 | / pub fn new() -> Self {
1814 | | Self {
1815 | | cache: HashMap::new(),
1816 | | max_size: 1000,
... |
1819 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
1812 + impl Default for QueryCache {
1813 + fn default() -> Self {
1814 + Self::new()
1815 + }
1816 + }
|
error: use of `println!`
--> trading_engine/src/compliance/automated_reporting.rs:760:9
|
760 | println!("Starting automated regulatory reporting system...");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/compliance/automated_reporting.rs:765:9
|
765 | println!("Automated reporting system started successfully");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `println!`
--> trading_engine/src/compliance/automated_reporting.rs:766:9
|
766 | println!("Active schedules: {}", self.config.schedules.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: infinite loop detected
--> trading_engine/src/compliance/automated_reporting.rs:830:13
|
830 | / loop {
831 | | interval.tick().await;
... |
855 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: use of `println!`
--> trading_engine/src/compliance/automated_reporting.rs:841:25
|
841 | / println!(
842 | | "Processing due schedule: {} ({})",
843 | | schedule.name, schedule.schedule_id
844 | | );
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
error: use of `eprintln!`
--> trading_engine/src/compliance/automated_reporting.rs:851:29
|
851 | ... eprintln!("Failed to mark schedule as processed: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: infinite loop detected
--> trading_engine/src/compliance/automated_reporting.rs:867:13
|
867 | / loop {
868 | | interval.tick().await;
... |
874 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: use of `eprintln!`
--> trading_engine/src/compliance/automated_reporting.rs:872:21
|
872 | eprintln!("Error processing submissions: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: infinite loop detected
--> trading_engine/src/compliance/automated_reporting.rs:883:13
|
883 | / loop {
884 | | interval.tick().await;
... |
890 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: use of `eprintln!`
--> trading_engine/src/compliance/automated_reporting.rs:888:21
|
888 | eprintln!("Error updating metrics: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: wildcard match will also match any future added variants
--> trading_engine/src/compliance/automated_reporting.rs:922:13
|
922 | _ => {
| ^ help: try: `ScheduledReportType::BestExecutionReports | ScheduledReportType::TransparencyReports | ScheduledReportType::SOXManagementCertification | ScheduledReportType::AuditTrailSummary | ScheduledReportType::RiskManagementReports | ScheduledReportType::Custom{ .. }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
error: wildcard match will also match any future added variants
--> trading_engine/src/compliance/automated_reporting.rs:961:13
|
961 | _ => ReportingPeriod {
| ^ help: try: `ScheduledReportType::BestExecutionReports | ScheduledReportType::TransparencyReports | ScheduledReportType::SOXComplianceAssessment | ScheduledReportType::SOXManagementCertification | ScheduledReportType::AuditTrailSummary | ScheduledReportType::RiskManagementReports | ScheduledReportType::Custom{ .. }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
error: used `unwrap()` on an `Option` value
--> trading_engine/src/compliance/automated_reporting.rs:956:29
|
956 | start_date: now.date_naive().and_hms_opt(0, 0, 0).unwrap().and_utc()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
--> trading_engine/src/compliance/automated_reporting.rs:7:9
|
7 | #![deny(clippy::unwrap_used, clippy::expect_used)]
| ^^^^^^^^^^^^^^^^^^^
error: used `unwrap()` on an `Option` value
--> trading_engine/src/compliance/automated_reporting.rs:958:27
|
958 | end_date: now.date_naive().and_hms_opt(0, 0, 0).unwrap().and_utc(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, it will panic
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
error: the function has a cognitive complexity of (37/30)
--> trading_engine/src/compliance/automated_reporting.rs:1307:14
|
1307 | async fn execute_submission(
| ^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
error: found empty brackets on struct declaration
--> trading_engine/src/compliance/compliance_reporting.rs:1339:27
|
1339 | pub struct PolicyEvaluator {}
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
= help: remove the brackets
error: found empty brackets on struct declaration
--> trading_engine/src/compliance/compliance_reporting.rs:1376:28
|
1376 | pub struct CleanupScheduler {}
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
= help: remove the brackets
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/compliance_reporting.rs:2028:19
|
2028 | .bind(&format!("{:?}", event.event_type))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:?}", event.event_type)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/compliance_reporting.rs:2029:19
|
2029 | .bind(&event.timestamp)
| ^^^^^^^^^^^^^^^^ help: change this to: `event.timestamp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/compliance_reporting.rs:2037:19
|
2037 | .bind(&format!("{:?}", event.risk_level))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{:?}", event.risk_level)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
error: the borrowed expression implements the required traits
--> trading_engine/src/compliance/compliance_reporting.rs:2039:17
|
2039 | / &event
2040 | | .compliance_categories
2041 | | .iter()
2042 | | .map(|c| format!("{:?}", c))
2043 | | .collect::<Vec<_>>(),
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
help: change this to
|
2039 ~ event
2040 + .compliance_categories
2041 + .iter()
2042 + .map(|c| format!("{:?}", c))
2043 ~ .collect::<Vec<_>>(),
|
error: redundant closure
--> trading_engine/src/compliance/compliance_reporting.rs:2049:26
|
2049 | .map(|d| serde_json::to_value(d))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `serde_json::to_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
error: you should consider adding a `Default` implementation for `EventEnricher`
--> trading_engine/src/compliance/compliance_reporting.rs:2080:5
|
2080 | / pub fn new() -> Self {
2081 | | Self {
2082 | | enrichment_rules: Vec::new(),
2083 | | context_cache: HashMap::new(),
2084 | | }
2085 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2079 + impl Default for EventEnricher {
2080 + fn default() -> Self {
2081 + Self::new()
2082 + }
2083 + }
|
error: you should consider adding a `Default` implementation for `TemplateEngine`
--> trading_engine/src/compliance/compliance_reporting.rs:2166:5
|
2166 | / pub fn new() -> Self {
2167 | | Self {
2168 | | templates: HashMap::new(),
2169 | | template_cache: HashMap::new(),
2170 | | }
2171 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2165 + impl Default for TemplateEngine {
2166 + fn default() -> Self {
2167 + Self::new()
2168 + }
2169 + }
|
error: you should consider adding a `Default` implementation for `ReportScheduler`
--> trading_engine/src/compliance/compliance_reporting.rs:2175:5
|
2175 | / pub const fn new() -> Self {
2176 | | Self {
2177 | | schedules: Vec::new(),
2178 | | job_queue: Vec::new(),
2179 | | }
2180 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2174 + impl Default for ReportScheduler {
2175 + fn default() -> Self {
2176 + Self::new()
2177 + }
2178 + }
|
error: you should consider adding a `Default` implementation for `PolicyEvaluator`
--> trading_engine/src/compliance/compliance_reporting.rs:2318:5
|
2318 | / pub const fn new() -> Self {
2319 | | Self {}
2320 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2317 + impl Default for PolicyEvaluator {
2318 + fn default() -> Self {
2319 + Self::new()
2320 + }
2321 + }
|
error: you should consider adding a `Default` implementation for `CleanupScheduler`
--> trading_engine/src/compliance/compliance_reporting.rs:2324:5
|
2324 | / pub const fn new() -> Self {
2325 | | Self {}
2326 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2323 + impl Default for CleanupScheduler {
2324 + fn default() -> Self {
2325 + Self::new()
2326 + }
2327 + }
|
error: you should consider adding a `Default` implementation for `InformationSecurityManagementSystem`
--> trading_engine/src/compliance/iso27001_compliance.rs:3086:5
|
3086 | / pub fn new() -> Self {
3087 | | Self {
3088 | | policies: HashMap::new(),
3089 | | procedures: HashMap::new(),
... |
3118 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
3085 + impl Default for InformationSecurityManagementSystem {
3086 + fn default() -> Self {
3087 + Self::new()
3088 + }
3089 + }
|
error: used underscore-prefixed binding
--> trading_engine/src/compliance/iso27001_compliance.rs:3129:31
|
3129 | risk_methodology: _methodology.clone(),
| ^^^^^^^^^^^^
|
note: binding is defined here
--> trading_engine/src/compliance/iso27001_compliance.rs:3126:16
|
3126 | pub fn new(_methodology: &RiskMethodology) -> Self {
| ^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: used underscore-prefixed binding
--> trading_engine/src/compliance/iso27001_compliance.rs:3142:21
|
3142 | config: _config.clone(),
| ^^^^^^^
|
note: binding is defined here
--> trading_engine/src/compliance/iso27001_compliance.rs:3140:16
|
3140 | pub fn new(_config: &IncidentResponseConfig) -> Self {
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: used underscore-prefixed binding
--> trading_engine/src/compliance/iso27001_compliance.rs:3157:21
|
3157 | config: _config.clone(),
| ^^^^^^^
|
note: binding is defined here
--> trading_engine/src/compliance/iso27001_compliance.rs:3155:16
|
3155 | pub fn new(_config: &BusinessContinuityConfig) -> Self {
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: you should consider adding a `Default` implementation for `AssetManager`
--> trading_engine/src/compliance/iso27001_compliance.rs:3194:5
|
3194 | / pub fn new() -> Self {
3195 | | Self {
3196 | | asset_inventory: HashMap::new(),
3197 | | classification_scheme: ClassificationScheme {
... |
3205 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
3193 + impl Default for AssetManager {
3194 + fn default() -> Self {
3195 + Self::new()
3196 + }
3197 + }
|
error: you should consider adding a `Default` implementation for `SecurityPolicyManager`
--> trading_engine/src/compliance/iso27001_compliance.rs:3238:5
|
3238 | / pub fn new() -> Self {
3239 | | Self {
3240 | | policies: HashMap::new(),
3241 | | procedures: HashMap::new(),
... |
3245 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
3237 + impl Default for SecurityPolicyManager {
3238 + fn default() -> Self {
3239 + Self::new()
3240 + }
3241 + }
|
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:394:13
|
394 | eprintln!("HTTP API server would start on {}", bind_addr);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:395:13
|
395 | eprintln!("Available endpoints:");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:396:13
|
396 | eprintln!(" POST /api/v1/mifid2/transaction-reports");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:397:13
|
397 | eprintln!(" GET /api/v1/sox/audit-events");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:398:13
|
398 | eprintln!(" POST /api/v1/mifid2/best-execution-analysis");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:399:13
|
399 | eprintln!(" GET /api/v1/compliance/status");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: infinite loop detected
--> trading_engine/src/compliance/regulatory_api.rs:402:13
|
402 | / loop {
403 | | tokio::time::sleep(tokio::time::Duration::from_secs(3600)).await;
404 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:420:13
|
420 | eprintln!("gRPC API server would start on {}", bind_addr);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:421:13
|
421 | eprintln!("Available gRPC services:");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:422:13
|
422 | eprintln!(" RegulatoryReporting.SubmitTransactionReport");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:423:13
|
423 | eprintln!(" ComplianceAudit.QueryAuditEvents");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: use of `eprintln!`
--> trading_engine/src/compliance/regulatory_api.rs:424:13
|
424 | eprintln!(" BestExecution.AnalyzeExecution");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
error: infinite loop detected
--> trading_engine/src/compliance/regulatory_api.rs:427:13
|
427 | / loop {
428 | | tokio::time::sleep(tokio::time::Duration::from_secs(3600)).await;
429 | | }
| |_____________^
|
= help: if this is not intended, try adding a `break` or `return` condition in the loop
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infinite_loop
error: redundant closure
--> trading_engine/src/compliance/regulatory_api.rs:559:65
|
559 | venue_analysis: request.include_venue_analysis.then(|| vec![]),
| ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
error: `to_string` applied to a type that implements `Display` in `format!` args
--> trading_engine/src/compliance/sox_compliance.rs:1815:60
|
1815 | certification_id: format!("CERT-{}-{}", officer.to_string(), Utc::now().timestamp()),
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
error: implementation of inherent method `to_string(&self) -> String` for type `compliance::sox_compliance::SOXComplianceManager`
--> trading_engine/src/compliance/sox_compliance.rs:1875:5
|
1875 | / fn to_string(&self) -> String {
1876 | | "SOXComplianceManager".to_string()
1877 | | }
| |_____^
|
= help: implement trait `Display` for type `compliance::sox_compliance::SOXComplianceManager` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
error: you should consider adding a `Default` implementation for `InternalControlsEngine`
--> trading_engine/src/compliance/sox_compliance.rs:1987:5
|
1987 | / pub fn new() -> Self {
1988 | | Self {
1989 | | controls_catalog: HashMap::new(),
1990 | | control_testing: ControlTestingEngine::new(),
... |
1993 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
1986 + impl Default for InternalControlsEngine {
1987 + fn default() -> Self {
1988 + Self::new()
1989 + }
1990 + }
|
error: you should consider adding a `Default` implementation for `ControlTestingEngine`
--> trading_engine/src/compliance/sox_compliance.rs:2009:5
|
2009 | / pub fn new() -> Self {
2010 | | Self {
2011 | | test_schedules: HashMap::new(),
2012 | | test_results: Vec::new(),
2013 | | }
2014 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2008 + impl Default for ControlTestingEngine {
2009 + fn default() -> Self {
2010 + Self::new()
2011 + }
2012 + }
|
error: you should consider adding a `Default` implementation for `DeficiencyTracker`
--> trading_engine/src/compliance/sox_compliance.rs:2018:5
|
2018 | / pub fn new() -> Self {
2019 | | Self {
2020 | | deficiencies: HashMap::new(),
2021 | | metrics: DeficiencyMetrics {
... |
2030 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2017 + impl Default for DeficiencyTracker {
2018 + fn default() -> Self {
2019 + Self::new()
2020 + }
2021 + }
|
error: you should consider adding a `Default` implementation for `SegregationOfDutiesManager`
--> trading_engine/src/compliance/sox_compliance.rs:2034:5
|
2034 | / pub fn new() -> Self {
2035 | | Self {
2036 | | sod_matrix: SegregationMatrix {
2037 | | roles: HashMap::new(),
... |
2044 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2033 + impl Default for SegregationOfDutiesManager {
2034 + fn default() -> Self {
2035 + Self::new()
2036 + }
2037 + }
|
error: you should consider adding a `Default` implementation for `ConflictDetector`
--> trading_engine/src/compliance/sox_compliance.rs:2052:5
|
2052 | / pub fn new() -> Self {
2053 | | Self {
2054 | | detection_rules: Vec::new(),
2055 | | active_conflicts: Vec::new(),
2056 | | }
2057 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2051 + impl Default for ConflictDetector {
2052 + fn default() -> Self {
2053 + Self::new()
2054 + }
2055 + }
|
error: you should consider adding a `Default` implementation for `ChangeManagementSystem`
--> trading_engine/src/compliance/sox_compliance.rs:2061:5
|
2061 | / pub fn new() -> Self {
2062 | | Self {
2063 | | change_requests: HashMap::new(),
2064 | | approval_engine: ChangeApprovalEngine::new(),
... |
2067 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2060 + impl Default for ChangeManagementSystem {
2061 + fn default() -> Self {
2062 + Self::new()
2063 + }
2064 + }
|
error: you should consider adding a `Default` implementation for `ChangeApprovalEngine`
--> trading_engine/src/compliance/sox_compliance.rs:2075:5
|
2075 | / pub fn new() -> Self {
2076 | | Self {
2077 | | approval_workflows: HashMap::new(),
2078 | | approval_history: Vec::new(),
2079 | | }
2080 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2074 + impl Default for ChangeApprovalEngine {
2075 + fn default() -> Self {
2076 + Self::new()
2077 + }
2078 + }
|
error: you should consider adding a `Default` implementation for `ChangeImpactAnalyzer`
--> trading_engine/src/compliance/sox_compliance.rs:2084:5
|
2084 | / pub fn new() -> Self {
2085 | | Self {
2086 | | impact_models: HashMap::new(),
2087 | | dependency_graph: DependencyGraph {
... |
2092 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2083 + impl Default for ChangeImpactAnalyzer {
2084 + fn default() -> Self {
2085 + Self::new()
2086 + }
2087 + }
|
error: you should consider adding a `Default` implementation for `AccessControlMatrix`
--> trading_engine/src/compliance/sox_compliance.rs:2096:5
|
2096 | / pub fn new() -> Self {
2097 | | Self {
2098 | | user_roles: HashMap::new(),
2099 | | role_permissions: HashMap::new(),
... |
2102 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2095 + impl Default for AccessControlMatrix {
2096 + fn default() -> Self {
2097 + Self::new()
2098 + }
2099 + }
|
error: redundant clone
--> trading_engine/src/compliance/sox_compliance.rs:2125:36
|
2125 | self.audit_trail.push(event.clone());
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> trading_engine/src/compliance/sox_compliance.rs:2125:31
|
2125 | self.audit_trail.push(event.clone());
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-D clippy::redundant-clone` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`
error: wildcard match will also match any future added variants
--> trading_engine/src/compliance/sox_compliance.rs:2151:17
|
2151 | _ => EventOutcome::Failure,
| ^ help: try: `TestConclusion::SignificantDeficiency | TestConclusion::MaterialWeakness | TestConclusion::NotOperating`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_enum_match_arm
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/sox_compliance.rs:2229:5
|
2229 | / fn serialize_test_result(
2230 | | &self,
2231 | | test_result: &ControlTestResult,
2232 | | ) -> Result<HashMap<String, serde_json::Value>, SOXComplianceError> {
| |_______________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
2232 - ) -> Result<HashMap<String, serde_json::Value>, SOXComplianceError> {
2232 + ) -> std::collections::HashMap<std::string::String, serde_json::Value> {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
2247 - Ok(details)
2247 + details
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/sox_compliance.rs:2251:5
|
2251 | / fn serialize_deficiency(
2252 | | &self,
2253 | | deficiency: &ControlDeficiency,
2254 | | ) -> Result<HashMap<String, serde_json::Value>, SOXComplianceError> {
| |_______________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
2254 - ) -> Result<HashMap<String, serde_json::Value>, SOXComplianceError> {
2254 + ) -> std::collections::HashMap<std::string::String, serde_json::Value> {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
2269 - Ok(details)
2269 + details
|
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:66:5
|
66 | /// TransactionReportingConfig
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
66 | /// TransactionReportingConfig
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:269:5
|
269 | /// ValidationSeverity
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
269 | /// ValidationSeverity
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:294:5
|
294 | /// TransactionReport
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
294 | /// TransactionReport
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:701:5
|
701 | /// TransactionReportBuilder
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
701 | /// TransactionReportBuilder
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:793:5
|
793 | /// ReportSubmissionManager
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
793 | /// ReportSubmissionManager
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:878:5
|
878 | /// ReportValidationEngine
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
878 | /// ReportValidationEngine
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:937:5
|
937 | /// SchemaRuleType
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
937 | /// SchemaRuleType
| ++
error: doc list item without indentation
--> trading_engine/src/compliance/transaction_reporting.rs:1143:9
|
1143 | /// Submit report to competent authority
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
1143 | /// Submit report to competent authority
| ++
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1231:5
|
1231 | / fn build_report_header(
1232 | | &self,
1233 | | execution: &OrderExecution,
1234 | | ) -> Result<ReportHeader, TransactionReportingError> {
| |________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1234 - ) -> Result<ReportHeader, TransactionReportingError> {
1234 + ) -> compliance::transaction_reporting::ReportHeader {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1235 ~ ReportHeader {
1236 + report_id: format!("RPT-{}-{}", execution.execution_id, Utc::now().timestamp()),
1237 + reporting_entity_lei: "FOXHUNT123456789012".to_owned(), // Replace with actual LEI
1238 + trading_capacity: TradingCapacity::DealingOwnAccount,
1239 + report_timestamp: Utc::now(),
1240 + report_version: "1.0".to_owned(),
1241 + original_report_reference: None,
1242 + }
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1255:5
|
1255 | / fn extract_transaction_details(
1256 | | &self,
1257 | | execution: &OrderExecution,
1258 | | ) -> Result<TransactionDetails, TransactionReportingError> {
| |______________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1258 - ) -> Result<TransactionDetails, TransactionReportingError> {
1258 + ) -> compliance::transaction_reporting::TransactionDetails {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1259 ~ TransactionDetails {
1260 + transaction_reference: execution.execution_id.clone(),
1261 + trading_datetime: execution.execution_time,
1262 + trading_capacity: TradingCapacity::DealingOwnAccount,
1263 + quantity: execution.filled_quantity,
1264 + unit_of_measure: UnitOfMeasure::Units,
1265 + price: execution.execution_price,
1266 + price_currency: execution.currency.clone(),
1267 + net_amount: {
1268 + let qty_decimal = execution.filled_quantity;
1269 + let price_decimal = execution.execution_price;
1270 + qty_decimal * price_decimal
1271 + },
1272 + venue_of_execution: execution.venue.clone(),
1273 + country_of_branch: None,
1274 + }
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1287:5
|
1287 | / fn build_instrument_identification(
1288 | | &self,
1289 | | execution: &OrderExecution,
1290 | | ) -> Result<InstrumentIdentification, TransactionReportingError> {
| |____________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1290 - ) -> Result<InstrumentIdentification, TransactionReportingError> {
1290 + ) -> compliance::transaction_reporting::InstrumentIdentification {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1291 ~ InstrumentIdentification {
1292 + isin: execution.isin.clone(),
1293 + alternative_identifier: Some(execution.symbol.clone()),
1294 + instrument_name: execution.symbol.clone(),
1295 + classification: InstrumentClassification::Equity, // Determine from instrument data
1296 + }
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1310:5
|
1310 | / fn extract_investment_decision_info(
1311 | | &self,
1312 | | _execution: &OrderExecution,
1313 | | ) -> Result<InvestmentDecisionInfo, TransactionReportingError> {
| |__________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1313 - ) -> Result<InvestmentDecisionInfo, TransactionReportingError> {
1313 + ) -> compliance::transaction_reporting::InvestmentDecisionInfo {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1314 ~ InvestmentDecisionInfo {
1315 + decision_maker: DecisionMaker::Algorithm {
1316 + algorithm_id: "FOXHUNT_TRADING_ALGO_v1.0".to_owned(),
1317 + description: "Foxhunt High-Frequency Trading Algorithm".to_owned(),
1318 + },
1319 + country_of_branch: None,
1320 + }
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1333:5
|
1333 | / fn extract_execution_info(
1334 | | &self,
1335 | | execution: &OrderExecution,
1336 | | ) -> Result<ExecutionInfo, TransactionReportingError> {
| |_________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1336 - ) -> Result<ExecutionInfo, TransactionReportingError> {
1336 + ) -> compliance::transaction_reporting::ExecutionInfo {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1337 ~ ExecutionInfo {
1338 + executor: DecisionMaker::Algorithm {
1339 + algorithm_id: "FOXHUNT_EXECUTION_ALGO_v1.0".to_owned(),
1340 + description: "Foxhunt Execution Management System".to_owned(),
1341 + },
1342 + execution_timestamp: execution.execution_time,
1343 + transmission_method: TransmissionMethod::DirectElectronicAccess,
1344 + }
|
error: this function's return value is unnecessarily wrapped by `Result`
--> trading_engine/src/compliance/transaction_reporting.rs:1357:5
|
1357 | / fn build_venue_info(
1358 | | &self,
1359 | | execution: &OrderExecution,
1360 | | ) -> Result<VenueInfo, TransactionReportingError> {
| |_____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
help: remove `Result` from the return type...
|
1360 - ) -> Result<VenueInfo, TransactionReportingError> {
1360 + ) -> compliance::transaction_reporting::VenueInfo {
|
help: ...and then remove the surrounding `Ok()` from returning expressions
|
1361 ~ VenueInfo {
1362 + venue_id: execution.venue.clone(),
1363 + venue_name: execution.venue.clone(), // Map to full venue name
1364 + venue_mic: execution.venue.clone(), // Map to MIC code
1365 + venue_country: "US".to_owned(), // Determine from venue
1366 + }
|
error: used underscore-prefixed binding
--> trading_engine/src/compliance/transaction_reporting.rs:1386:31
|
1386 | reporting_period: _period.clone(),
| ^^^^^^^
|
note: binding is defined here
--> trading_engine/src/compliance/transaction_reporting.rs:1381:9
|
1381 | _period: &ReportingPeriod,
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: used underscore-prefixed binding
--> trading_engine/src/compliance/transaction_reporting.rs:1411:31
|
1411 | reporting_period: _period.clone(),
| ^^^^^^^
|
note: binding is defined here
--> trading_engine/src/compliance/transaction_reporting.rs:1406:9
|
1406 | _period: &ReportingPeriod,
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
error: calls to `push` immediately after creation
--> trading_engine/src/compliance/transaction_reporting.rs:1669:9
|
1669 | / let mut results = Vec::new();
1670 | |
1671 | | // Basic field validation
1672 | | results.push(ValidationResult {
... |
1684 | | validated_at: Utc::now(),
1685 | | });
| |___________^ help: consider using the `vec![]` macro: `let results = vec![..];`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
= note: `-D clippy::vec-init-then-push` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::vec_init_then_push)]`
error: could not compile `trading_engine` (lib) due to 603 previous errors