Skip to content

Commit 9f694f7

Browse files
Copilotfrhuelsz
andauthored
fix: remove stale self reference from derive_host_configuration_inner doc comment (#532)
# 🔍 Description Engineering cleanup. The doc comment on `derive_host_configuration_inner` referenced "Take an immutable reference to self" — a rationale that became inaccurate when the function was refactored from a method to a free function taking individual parameters. # 🤔 Rationale Stale comment flagged in [#529 review](#529 (comment)). The bullet describing `&self` semantics no longer applies and was misleading. **Before:** ```rust /// This is separated from `derive_host_configuration` to: /// /// - Allow for easier testing since we can directly construct a COSI object /// with the required fields without having to go through the GPT /// population logic. /// - Take an immutable reference to self, which makes it clear that this /// function does not modify the COSI object and relies on all necessary /// data being pre-populated. (Also simplifies borrowing.) pub(super) fn derive_host_configuration_inner( source_url: &Url, ... ``` **After:** ```rust /// This is separated from `derive_host_configuration` to allow for easier /// testing since we can directly construct a COSI object with the required /// fields without having to go through the GPT population logic. pub(super) fn derive_host_configuration_inner( source_url: &Url, ... ``` # 📝 Checks - [x] Check [dev-docs/manual-validation.md](/dev-docs/manual-validation.md) # 📌 Follow-ups TODO: - #0000 # 🗒️ Notes <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frhuelsz <97629030+frhuelsz@users.noreply.github.com>
1 parent dbdcada commit 9f694f7

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

crates/trident/src/osimage/cosi/derived_hc.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@ use super::{metadata::Image, CosiPartitioningInfo};
2121
/// A helper function that performs the actual derivation of the host
2222
/// configuration assuming that the COSI version is sufficient and the
2323
/// necessary metadata and GPT data are present. This is separated from
24-
/// `derive_host_configuration` to:
25-
///
26-
/// - Allow for easier testing since we can directly construct a COSI object
27-
/// with the required fields without having to go through the GPT
28-
/// population logic.
29-
/// - Take an immutable reference to self, which makes it clear that this
30-
/// function does not modify the COSI object and relies on all necessary
31-
/// data being pre-populated. (Also simplifies borrowing.)
24+
/// `derive_host_configuration` to allow for easier testing since we can
25+
/// directly construct a COSI object with the required fields without having
26+
/// to go through the GPT population logic.
3227
pub(super) fn derive_host_configuration_inner(
3328
source_url: &Url,
3429
metadata_sha384: &Sha384Hash,

0 commit comments

Comments
 (0)