Skip to content

Commit

Permalink
Docs: Add comment on AsRef<Param> impl block.
Browse files Browse the repository at this point in the history
  • Loading branch information
raynelfss committed Aug 30, 2024
1 parent 306eb8c commit e04eaca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/circuit/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ impl Param {
}
}

// This impl allows for shared usage between [Param] and &[Param].
// Such blanked impl doesn't exist inherently due to Rust's type system limitations.
// See https://doc.rust-lang.org/std/convert/trait.AsRef.html#reflexivity for more information.
impl AsRef<Param> for Param {
fn as_ref(&self) -> &Param {
self
Expand Down

0 comments on commit e04eaca

Please sign in to comment.