Skip to content

Commit

Permalink
Fix doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SethDusek committed Jun 15, 2024
1 parent ae7c114 commit 6ec6649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ergotree-ir/src/reference.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Reference type used extensively throughout interpreter. a Ref<'ctx, T> can either borrow from Context or be Arc<T>
//! Reference type used extensively throughout interpreter. a Ref<'ctx, T> can either borrow from Context or be `Arc<T>`
use std::{ops::Deref, sync::Arc};

#[derive(Clone, Debug, Eq)]
/// A wrapper type that provides immutable access to [`T`]. Ref can either be [`Ref::Borrowed`], holding a reference to some data in the [`Context`], or [`Ref::Arc`]
/// A wrapper type that provides immutable access to T. Ref can either be [`Ref::Borrowed`], holding a reference to some data in Context, or [`Ref::Arc`]
pub enum Ref<'ctx, T> {
/// Data is borrowed from Context
Borrowed(&'ctx T),
Expand All @@ -23,7 +23,7 @@ impl<'ctx, T: Clone> Ref<'ctx, T> {
pub fn to_static(&'ctx self) -> Ref<'static, T> {
Ref::Arc(self.to_arc())
}
/// Convert [`Self`] to Arc
/// Convert [`Self`] to `Arc<T>`
pub fn to_arc(&'ctx self) -> Arc<T> {
match self {
Ref::Arc(r) => r.clone(),
Expand Down

0 comments on commit 6ec6649

Please sign in to comment.