summaryrefslogtreecommitdiff
path: root/rust/src/rc.rs
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2023-02-14 00:09:13 -0500
committerKyleMiles <krm504@nyu.edu>2023-02-14 00:15:57 -0500
commit9e91eaf63aed340a2c0a61ad8f70e9a7883e3aba (patch)
treea77dc4618b1f2848b09694a4fb81b4fa193a1566 /rust/src/rc.rs
parent60f49f32d989355696b1eb78aee98140f417952c (diff)
Rust API: Misc changes and improvements
Diffstat (limited to 'rust/src/rc.rs')
-rw-r--r--rust/src/rc.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/src/rc.rs b/rust/src/rc.rs
index 4ffecb3f..2e4086e3 100644
--- a/rust/src/rc.rs
+++ b/rust/src/rc.rs
@@ -48,6 +48,7 @@ pub struct Ref<T: RefCountable> {
}
impl<T: RefCountable> Ref<T> {
+ /// Safety: You need to make sure wherever you got the contents from incremented the ref count already. Anywhere the core passes out an object to the API does this.
pub(crate) unsafe fn new(contents: T) -> Self {
Self { contents }
}