Skip to content

Commit 141b95a

Browse files
committed
Take Option in refcount unique_ptr get, operator* and operator-> rules
1 parent 6b23c59 commit 141b95a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎rules/unique_ptr/tgt_refcount.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn f1<T1: CppArray<T2>, T2: Default>(a0: usize) -> Option<Value<Box<[T2]>>> {
2727
)))
2828
}
2929

30-
fn f2<T1>(a0: Value<T1>) -> Ptr<T1> {
30+
fn f2<T1>(a0: Option<Value<T1>>) -> Ptr<T1> {
3131
a0.as_pointer()
3232
}
3333

@@ -88,11 +88,11 @@ fn f15<T1: ByteRepr>(a0: Ptr<Option<Value<Box<[T1]>>>>, a1: &mut Option<Value<Bo
8888
a0.write(a1.take())
8989
}
9090

91-
fn f17<T1>(a0: Value<T1>) -> Ptr<T1> {
91+
fn f17<T1>(a0: Option<Value<T1>>) -> Ptr<T1> {
9292
a0.as_pointer()
9393
}
9494

95-
fn f18<T1>(a0: Value<T1>) -> Ptr<T1> {
95+
fn f18<T1>(a0: Option<Value<T1>>) -> Ptr<T1> {
9696
a0.as_pointer()
9797
}
9898

0 commit comments

Comments
 (0)