Skip to content

Commit

Permalink
Update rust compiler to 1.84 version (#124)
Browse files Browse the repository at this point in the history
Fix clippy warnings from new version.
  • Loading branch information
youyuanwu authored Jan 10, 2025
1 parent 2e4c285 commit 6d4b848
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.79.0
toolchain: 1.84.0
components: rustfmt, clippy

- name: Run cargo check
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Install rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.79.0
toolchain: 1.84.0
components: rustfmt, clippy

- name: Run cargo check
Expand Down
4 changes: 2 additions & 2 deletions crates/libs/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//! For most scenarios, you'll want the features. However, in some scenarios, such as:
//! - integrating Rust into an existing Service Fabric Application written in another language
//! - when you are using the lower-level COM API to do something more custom
//! You might not need all of the functionality that the mssf-core crate provides
//! In this case, you can configure only what you need to reduce dependencies and compile times.
//! You might not need all of the functionality that the mssf-core crate provides
//! In this case, you can configure only what you need to reduce dependencies and compile times.
//!
//! * ** config_source ** -
//! Provides an implementation of config::Source. Requires config_rs crate
Expand Down
12 changes: 6 additions & 6 deletions crates/libs/core/src/runtime/stateful_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ impl StatefulServicePartition {
unsafe { self.com_impl.ReportMoveCost(move_cost.into()) }
}

/// Remarks:
/// The health information describes the report details, like the source ID, the property,
/// the health state and other relevant details. The partition uses an internal health client
/// to send the reports to the health store. The client optimizes messages to Health Manager
/// by batching reports per a configured duration (Default: 30 seconds). If the report has high priority,
/// you can specify send options to send it immediately.
// Remarks:
// The health information describes the report details, like the source ID, the property,
// the health state and other relevant details. The partition uses an internal health client
// to send the reports to the health store. The client optimizes messages to Health Manager
// by batching reports per a configured duration (Default: 30 seconds). If the report has high priority,
// you can specify send options to send it immediately.

/// Reports current partition health.
pub fn report_partition_health(&self, healthinfo: &HealthInformation) -> crate::Result<()> {
Expand Down
3 changes: 2 additions & 1 deletion crates/libs/core/src/sync/bridge_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ where
/// This api is in some sense unsafe, because the developer needs to ensure
/// the following:
/// * context impl type is `BridgeContext3`, and the T matches the SF end api
/// return type.
/// return type.
///
/// Note that if T is of Result<ICOM> type, the current function return type is
/// Result<Result<ICOM>>, so unwrap is needed.
pub fn result(context: windows_core::Ref<IFabricAsyncOperationContext>) -> crate::Result<T> {
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/core/src/types/common/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct LoadMetricListRef<'a> {
owner: PhantomData<&'a [LoadMetric]>,
}

impl<'a> LoadMetricListRef<'a> {
impl LoadMetricListRef<'_> {
pub fn from_slice(v: &[LoadMetric]) -> Self {
let metrics = v.iter().map(FABRIC_LOAD_METRIC::from).collect::<Vec<_>>();
Self {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# cargo + rustup will use this to consistently build the project
# with the same version across all checkouts and environments
[toolchain]
channel = "1.79.0"
channel = "1.84.0"
profile = "default"

0 comments on commit 6d4b848

Please sign in to comment.